Created
April 9, 2016 17:02
-
-
Save jaseg/880d09480f5b4abea69381c89a65e8ce to your computer and use it in GitHub Desktop.
Revisions
-
jaseg created this gist
Apr 9, 2016 .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,10 @@ # Modified cd that also displays the directory's contents if the listing is less than 5 lines long function cd if test -n "$argv" if test -e $argv -a ! -d (realpath $argv) set argv (dirname $argv) end end builtin cd $argv and test (ls -C -w $COLUMNS |wc -l) -le 5; and ls end