# -*- mode: shell-script -*- # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ] then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias dir='ls --color=auto --format=vertical' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias ls='ls -hF --color=auto' alias vdir='ls --color=auto --format=long' fi # some more ls aliases alias l='ls -CF' alias l1='ls -1 --group-directories-first' alias l1a='ls -1A --group-directories-first' alias la='ls -A' alias ll='ls -l' alias lla='ls -lA' # Other aliases alias cls='clear' alias del='rm' alias h='history' alias j="jobs -l" alias po="popd" alias pu="pushd" alias whence='type -a' alias cd-home='pushd "${HOME}"' alias cd-vcpkg='pushd "${VCPKG_ROOT}"' WHERE_LOC=$(type -ap where) if [ -z "${WHERE_LOC}" ] then alias where='type -a' fi WSLPATH_LOC=$(type -ap wslpath) if [ ! -z "${WSLPATH_LOC}" ] then alias wsleh='explorer.exe `wslpath -w .`' fi # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' # # Csh compatability: # alias unsetenv=unset function setenv () { export $1="$2" }