Created
April 9, 2012 08:29
-
-
Save vain/2342295 to your computer and use it in GitHub Desktop.
Revisions
-
vain created this gist
Apr 9, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ wrapoff() { # Wraparound aus, damit lange Zeilen nicht umgebrochen werden. # Das ist eine XTerm-Einstellung, mache das also nur, wenn stdout # ein solches ist und auch wirklich ein Terminal ist, also nicht # gerade umgeleitet wird. [[ -t 1 ]] || return case "$TERM" in xterm*|rxvt*) echo -n $'\e[?7l' ;; esac } wrapon() { # Wraparound wieder an. [[ -t 1 ]] || return case "$TERM" in xterm*|rxvt*) echo -n $'\e[?7h' ;; esac } l() { wrapoff unset a if [[ "$1" == "+a" ]] then shift else a="a" fi ls -Fl$a --block-size="'1" --color=always --group-directories-first \ -q "$@" | ~void/bin/coloredls.pl # Merke dir den Rückgabewert von ls. Der Rest ist egal. ret=${PIPESTATUS[0]} wrapon return $ret } ll() { l "$@" | less }