summaryrefslogtreecommitdiff
path: root/.config/bash/aliases.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/bash/aliases.sh')
-rw-r--r--.config/bash/aliases.sh59
1 files changed, 59 insertions, 0 deletions
diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh
new file mode 100644
index 0000000..8241b95
--- /dev/null
+++ b/.config/bash/aliases.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+# The above line probably should never be *used* in this file, but it
+# lets text editors know that this is BASH syntax.
+
+######################################################################
+# Set up colors and settings for ls/dir/vdir #
+######################################################################
+if [ -x "`which dircolors`" ]; then
+ eval "`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 ssh='ssh -XC'
+alias sed='sed --follow-symlinks'
+alias tree='tree --charset utf8'
+alias cd=pushd
+alias gitk='gitk --all --date-order'
+
+######################################################################
+# Remember lat/long for redshift #
+######################################################################
+redshift='redshift -l39.9030:85.9979'
+alias gtk-redshift="gtk-$redshift"
+alias redshift="$redshift"
+unset redshift
+
+######################################################################
+# Some almost-function aliases #
+######################################################################
+xterm-title() { echo "];$@"; } # Oh, wait this one *is* a function
+alias lock="clear; away -C 'This terminal is locked'"
+alias plock="xterm-title Terminal Locked;lock"
+mvln() { mv $1 $2; ln -s $2 $1; }