
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 |
|||
|
|||
# if $1 is a text file, less it |
|||
if file "$1" | grep -q text; then |
|||
less -FRX "$1" |
|||
|
|||
# otherwise, just dir it |
|||
# if stdin is coming from a pipe, run less |
|||
if [[ ! -t 0 ]]; then |
|||
less -FX |
|||
# if there is only one arg and it is not a directory, less it |
|||
elif [[ -z "$2" && ! -d "$1" ]]; then |
|||
less -FX "$1" |
|||
# otherwise, run dir |
|||
else |
|||
ls -lhAF --color=auto "$@" |
|||
fi |
|||
|
Loading…
Reference in new issue