--- contrib/Makefile.am | 4 ++-- contrib/mc.sh.in | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) Index: mc-4.8.30/contrib/Makefile.am =================================================================== --- mc-4.8.30.orig/contrib/Makefile.am +++ mc-4.8.30/contrib/Makefile.am @@ -19,10 +19,10 @@ EXTRA_DIST = \ $(noinst_DATA) mc.csh: $(top_builddir)/config.status $(srcdir)/mc.csh.in - $(SED) "s%@""pkglibexecdir@%$(pkglibexecdir)%" $(srcdir)/mc.csh.in > mc.csh + $(SED) "s%@""datadir@%$(datadir)%" $(srcdir)/mc.csh.in > mc.csh mc.sh: $(top_builddir)/config.status $(srcdir)/mc.sh.in - $(SED) "s%@""pkglibexecdir@%$(pkglibexecdir)%" $(srcdir)/mc.sh.in > mc.sh + $(SED) "s%@""datadir@%$(datadir)%" $(srcdir)/mc.sh.in > mc.sh mc-wrapper.csh: $(top_builddir)/config.status $(srcdir)/mc-wrapper.csh.in $(SED) "s%@""bindir@%$(bindir)%" $(srcdir)/mc-wrapper.csh.in > mc-wrapper.csh Index: mc-4.8.30/contrib/mc.sh.in =================================================================== --- mc-4.8.30.orig/contrib/mc.sh.in +++ mc-4.8.30/contrib/mc.sh.in @@ -1,3 +1,10 @@ # Don't define aliases in plain Bourne shell [ -n "${BASH_VERSION}${KSH_VERSION}${ZSH_VERSION}" ] || return 0 -alias mc='. @pkglibexecdir@/mc-wrapper.sh' +mc() +{ +. @datadir@/mc/mc-wrapper.sh +} +if [ -n "$BASH_VERSION" ] +then + export -f mc +fi