]> git.friedersdorff.com Git - max/dotfiles.git/blobdiff - bash/.bash_aliases
Customized ratpoison configs for iridium and beryllium
[max/dotfiles.git] / bash / .bash_aliases
index 36e02d4dfdcb6bc659acc78c08415933a9fbfe5f..041788cd6d7d63e99157654c1f1f7ebde201f11b 100644 (file)
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 if [ -x /usr/bin/dircolors ]; then
     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
     alias ls='ls --color=auto'
@@ -9,5 +11,14 @@ if [ -x /usr/bin/dircolors ]; then
     alias egrep='egrep --color=auto'
 fi
 
-alias la='ls -lah'
+function la {
+    ls_out=$(\ls -lah --color=always "$@")
+    let "allowed_lines = $(tput lines) - 3"
+    if [ $(echo "$ls_out" | wc -l) -le $allowed_lines ]; then
+       echo "$ls_out"
+    else
+       echo "$ls_out" | less -r
+    fi
+}
 alias tmux='TERM=xterm-256color tmux'
+alias vim='gvim -v'