swdyh (owner)

Revisions

gist: 167744 Download_button fork
public
Public Clone URL: git://gist.github.com/167744.git
Embed All Files: show embed
lvls #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
 
ls='/bin/ls -vG'
lv='/opt/local/bin/lv -c'
 
if [ $# -ne 0 ]
then
eval last=\$\{$(expr $#)\}
    if [ -d $last ]
    then
        # echo '[Dir]'
        $ls $*
    elif [ -f $last ]
    then
        $lv $*
    fi
else
if [ -t 0 ]
    then
       $ls
    else
       $lv
    fi
fi