
3 changed files with 7 additions and 9 deletions
@ -1,2 +0,0 @@ |
|||||
#!/bin/bash |
|
||||
ls -lhAF --color=auto "$@" |
|
@ -1,2 +0,0 @@ |
|||||
#!/bin/bash |
|
||||
rsync -vaSH "$@" |
|
@ -1,10 +1,12 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
|
|
||||
# if $1 is a text file, less it |
# if stdin is coming from a pipe, run less |
||||
if file "$1" | grep -q text; then |
if [[ ! -t 0 ]]; then |
||||
less -FRX "$1" |
less -FX |
||||
|
# if there is only one arg and it is not a directory, less it |
||||
# otherwise, just dir it |
elif [[ -z "$2" && ! -d "$1" ]]; then |
||||
|
less -FX "$1" |
||||
|
# otherwise, run dir |
||||
else |
else |
||||
ls -lhAF --color=auto "$@" |
ls -lhAF --color=auto "$@" |
||||
fi |
fi |
||||
|
Loading…
Reference in new issue