Skip to content

Commit

Permalink
lib/bourne-shell: Remove duplicate aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jul 3, 2022
1 parent 0fe8c0b commit 3e441aa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
10 changes: 3 additions & 7 deletions lib/bourne-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,14 @@ if [ -x /usr/bin/dircolors ]; then
_omb_util_alias ls='ls --color=auto'
#_omb_util_alias ls='dir --color=auto'
#_omb_util_alias vdir='vdir --color=auto'
_omb_util_alias grep='grep --color=auto'
_omb_util_alias fgrep='fgrep --color=auto'
_omb_util_alias egrep='egrep --color=auto'

# Note: aliases "grep", "fgrep", and "egrep" are merged in lib/grep.sh
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
_omb_util_alias ll='ls -alF'
_omb_util_alias la='ls -A'
_omb_util_alias l='ls -CF'
# ls aliases are moved to "lib/directories.sh"

# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
Expand Down
11 changes: 8 additions & 3 deletions lib/directories.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ _omb_util_alias rd='rmdir'
_omb_util_alias d='dirs -v | head -10'

# List directory contents
_omb_util_alias lsa='ls -lah'
_omb_util_alias l='ls -lah'
_omb_util_alias lsa='ls -lha'
_omb_util_alias l='ls -lha'
_omb_util_alias ll='ls -lh'
_omb_util_alias la='ls -lAh'
_omb_util_alias la='ls -lhA'

# From bourne-shell.sh (unused)
#_omb_util_alias l='ls -CF'
#_omb_util_alias ll='ls -laF'
#_omb_util_alias la='ls -A'
2 changes: 2 additions & 0 deletions lib/grep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ fi
# export grep settings
if ((${#_omb_grep_options[@]} > 0)); then
_omb_util_alias grep="grep ${_omb_grep_options[*]}"
_omb_util_alias grep="fgrep ${_omb_grep_options[*]}"
_omb_util_alias grep="egrep ${_omb_grep_options[*]}"
fi

# clean up
Expand Down

0 comments on commit 3e441aa

Please sign in to comment.