commit
c519ff6b19
|
|
@ -1,9 +1,16 @@
|
||||||
cite about-alias
|
cite about-alias
|
||||||
about-alias 'general aliases'
|
about-alias 'general aliases'
|
||||||
|
|
||||||
|
if ls --color -d . &> /dev/null
|
||||||
|
then
|
||||||
|
alias ls="ls --color=auto"
|
||||||
|
elif ls -G -d . &> /dev/null
|
||||||
|
then
|
||||||
|
alias ls='ls -G' # Compact view, show colors
|
||||||
|
fi
|
||||||
|
|
||||||
# List directory contents
|
# List directory contents
|
||||||
alias sl=ls
|
alias sl=ls
|
||||||
alias ls='ls -G' # Compact view, show colors
|
|
||||||
alias la='ls -AF' # Compact view, show hidden
|
alias la='ls -AF' # Compact view, show hidden
|
||||||
alias ll='ls -al'
|
alias ll='ls -al'
|
||||||
alias l='ls -a'
|
alias l='ls -a'
|
||||||
|
|
@ -11,10 +18,15 @@ alias l1='ls -1'
|
||||||
|
|
||||||
alias _="sudo"
|
alias _="sudo"
|
||||||
|
|
||||||
if [ $(uname) = "Linux" ]
|
# colored grep
|
||||||
|
# Need to check an existing file for a pattern that will be found to ensure
|
||||||
|
# that the check works when on an OS that supports the color option
|
||||||
|
if grep --color=auto "a" $BASH_IT/*.md &> /dev/null
|
||||||
then
|
then
|
||||||
alias ls="ls --color=auto"
|
alias grep='grep --color=auto'
|
||||||
|
export GREP_COLOR='1;33'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
which gshuf &> /dev/null
|
which gshuf &> /dev/null
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# colored grep
|
|
||||||
alias grep='grep --color=auto'
|
|
||||||
export GREP_COLOR='1;33'
|
|
||||||
|
|
||||||
# colored ls
|
# colored ls
|
||||||
export LSCOLORS='Gxfxcxdxdxegedabagacad'
|
export LSCOLORS='Gxfxcxdxdxegedabagacad'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue