X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=bash%2F.bash_aliases;h=041788cd6d7d63e99157654c1f1f7ebde201f11b;hb=e1e1cbc8d10791ea427f5dc1f14b04ca47638c5a;hp=9c3be03e70c93ca21cd532027bd7aaa033bb2b12;hpb=a8244e06cd9069e62f97755502a1fe8379427a93;p=max%2Fdotfiles.git diff --git a/bash/.bash_aliases b/bash/.bash_aliases index 9c3be03..041788c 100644 --- a/bash/.bash_aliases +++ b/bash/.bash_aliases @@ -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,4 +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'