function l
if test (count $argv) -eq 0
ls
else if test (count $argv) -gt 1
echo "Too many arguments" >&2
else if test -d $argv[1]
ls $argv[1]
else if test ! -e $argv[1]
echo "Not exists" >&2
else if test (head -41 $argv[1] | wc -l) -lt 41
cat $argv[1]
else
less $argv[1]
end
end
Conversation
Notices
-
gyu-don (gyudon@qiitadon.com)'s status on Tuesday, 28-Aug-2018 11:57:21 JST gyu-don - 7of9(0x70f9=28921) repeated this.