Browse Source

improvements to shw, deleted aliases

master
Mario Alegre 5 years ago
parent
commit
a2d89b46a5
  1. 2
      dir
  2. 2
      rsyn
  3. 12
      shw

2
dir

@ -1,2 +0,0 @@
#!/bin/bash
ls -lhAF --color=auto "$@"

2
rsyn

@ -1,2 +0,0 @@
#!/bin/bash
rsync -vaSH "$@"

12
shw

@ -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…
Cancel
Save