diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2026-02-04 14:24:16 -0800 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2026-02-04 14:24:16 -0800 |
| commit | 9139a1b136fa2b5adfcac0ac09a4f61aa1ee1ff4 (patch) | |
| tree | de82bc4776b87f1fbb86f14b4a15d35d009ddd28 /misc/lk.sh | |
| parent | a9bf8f30c746f5b28bb7eb6938e8390127081a32 (diff) | |
full reorg
Diffstat (limited to 'misc/lk.sh')
| -rwxr-xr-x | misc/lk.sh | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/misc/lk.sh b/misc/lk.sh deleted file mode 100755 index 5f760c6..0000000 --- a/misc/lk.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# This is helper that should replace a number of common commands -# -# It is intended to be named `lk`, short for "look" - -longView=${PAGER:-$(which less || which more || echo "cat")} -dirView="ls --color=always -Alh" - -if [ $# -lt 1 ]; then - # take stdin instead - $dirView $(pwd) | ${longView} -fi - -for a in $@; do - if [ $a == "" ]; then - echo "Empty argument skipped" - elif [ ! -e $a ]; then - echo "$a does not exist" 1>&2 - exit -1 - elif [ -d $a ]; then - $dirView $a - elif [ $(tput lines) -ge $(($(wc -l < $a) - 2)) ]; then - cat $a - else - ${longView} $a - fi -done |
