diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-08-22 03:51:52 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-09-22 15:27:18 -0400 |
commit | 1ae109d7abae11a327f362bfdfb623ac0ac770e0 (patch) | |
tree | 5bf25f17077d4477c4a18a401081493076a8c28a /.config/bash/rc.d/aliases.sh | |
parent | ef71eedb6bcc3889128af24df3aa668dde3e2c6f (diff) |
Clean up bash configuration, and bash-emacs integration
Diffstat (limited to '.config/bash/rc.d/aliases.sh')
-rw-r--r-- | .config/bash/rc.d/aliases.sh | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/.config/bash/rc.d/aliases.sh b/.config/bash/rc.d/aliases.sh deleted file mode 100644 index cd2cfd8..0000000 --- a/.config/bash/rc.d/aliases.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/hint/bash - -###################################################################### -# Set up colors and settings for ls/dir/vdir # -###################################################################### -if [ -x "`which dircolors`" ]; then - eval "$(dircolors -p | cat - "${XDG_CONFIG_HOME}/dir_colors" | - dircolors -b -)" - alias ls='ls -1v --color=auto' - alias dir='dir -v --color=auto' - alias vdir='vdir -v --color=auto' - - for xgrep in ${PATH//:/\/*grep }/*grep; do - if [ -f "$xgrep" ]; then - xgrep=`basename "$xgrep"` - if [ "$xgrep" != pgrep ]; then - alias $xgrep="$xgrep --color=auto" - fi - fi - done -else - alias ls='ls -1v' - alias dir='dir -v' - alias vdir='vdir -v' -fi - -###################################################################### -# Set up the standard aliases for ls # -###################################################################### -alias ll='ls -l' -alias la='ls -a' -alias l='ls -CF' - -###################################################################### -# Some preferences for miscellaneous stuff # -###################################################################### -#alias rm='gvfs-trash' -#alias sed='sed --follow-symlinks' # breaks sed 4.2.2 -alias tree='tree --charset utf8' -alias cd=pushd -alias gitk='gitk --all --date-order' -alias userctl='systemctl --user' - -###################################################################### -# Some almost-function aliases # -###################################################################### -alias lock="clear; away -C 'This terminal is locked'" -alias plock="term-title Terminal Locked;lock" -mvln() { - if [[ ! -L "$1" ]]; then - libremessages error 'Not a soft link: %s' "$1" - fi - target=$(readlink -f -- "$1") - ln -srT -- "$target" "$2" - if cmp -- "$1" "$2"; then - rm -f -- "$1" - else - libremessages error 'Failed moving link: %s -> %s' "$1" "$2" - fi -} -jarls() { jar tf "$1" | sed -n 's/\.class$//p' | LC_ALL=C sort | xargs -r -d $'\n' javap -classpath "$1"; } -tarls() { local file; for file in "$@"; do bsdtar tf "$file" | sed "s|^|$file:|"; done; } -jarmain() { jarls "$1" 2>/dev/null | grep -E '(^[a-z]|public static void main\(java\.lang\.String\[\]\))' | grep -B1 '^ '; } |