We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
oh-my-bash currently overrides any aliases that has been set for ls, if /usr/bin/dircolors exists.
ls
/usr/bin/dircolors
This happens because of lines 61 to 70 in $OSH/lib/bourne-shell.sh.
$OSH/lib/bourne-shell.sh
An alternative for this would be to do
if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" if ! alias ls >/dev/null 2>&1; then alias ls='ls --color=auto' fi #if ! alias dir >/dev/null 2>&1; then # alias dir='dir --color=auto' #fi #if ! alias vdir; then # alias vdir='vdir --color=auto' #fi if ! alias grep >/dev/null 2>&1; then alias grep='grep --color=auto' fi if ! alias fgrep >/dev/null 2>&1; then alias fgrep='fgrep --color=auto' fi if ! alias egrep >/dev/null 2>&1; then alias egrep='egrep --color=auto' fi fi
This will only set the aliases if they don't already exist.
Will submit PR in a few.
The text was updated successfully, but these errors were encountered:
Fix ohmybash#304
8f6cd79
Fixes ohmybash#304 by checking if the alias already exists before applying it.
lib/bourne-shell: Do not override user-defined aliases (Fix ohmybash#304
ce1c03f
) Fixes ohmybash#304 by checking if the alias already exists before applying it.
c34a733
Successfully merging a pull request may close this issue.
oh-my-bash currently overrides any aliases that has been set for
ls
, if/usr/bin/dircolors
exists.This happens because of lines 61 to 70 in
$OSH/lib/bourne-shell.sh
.An alternative for this would be to do
This will only set the aliases if they don't already exist.
Will submit PR in a few.
The text was updated successfully, but these errors were encountered: