Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mc helpers for both tcsh and bash resources #141

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions files/etc/bash.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ elif test -s /usr/etc/profile.d/ls.bash
then . /usr/etc/profile.d/ls.bash
fi

if test -s /etc/profile.d/mc.sh
then . /etc/profile.d/mc.sh
elif test -s /usr/share/mc/mc.sh
then . /usr/share/mc/mc.sh
fi

#
# Avoid trouble with Emacs shell mode
#
Expand Down
5 changes: 4 additions & 1 deletion files/etc/csh.cshrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# This file sources /(usr/)etc/profile.d/complete.tcsh and
# /(usr/)etc/profile.d/bindkey.tcsh used especially by tcsh.
# For Midnight Commander (mc) also /etc/profile.d/mc.csh
# or /usr/share/mc/mc.csh is sourced.
#
# PLEASE DO NOT CHANGE /etc/csh.cshrc. There are chances that your changes
# will be lost during system upgrades. Instead use /etc/csh.cshrc.local for
Expand Down Expand Up @@ -111,12 +113,13 @@ set symlinks=ignore
unset autologout
unset ignoreeof

foreach _s (ls.tcsh alias.tcsh)
foreach _s (ls.tcsh alias.tcsh mc.csh)
if (-r /etc/profile.d/$_s) then
source /etc/profile.d/$_s
continue
endif
if (-r /usr/etc/profile.d/$_s) source /usr/etc/profile.d/$_s
if (-r /usr/share/mc/$_s) source /usr/share/mc/$_s
end
unset _s

Expand Down