diff --git a/.local/bin/scripts/b b/.local/bin/scripts/b index 4c3e716..5f17d81 100755 --- a/.local/bin/scripts/b +++ b/.local/bin/scripts/b @@ -16,9 +16,11 @@ test -x "$(dirname "$last")" && tput setaf 4 && $elevate file -E "$last" | ( grep -v --color=never 'directory$' || true ) case "$($elevate file --dereference --mime "$last")" in - *inode/directory*) tput sgr0 && $(test -x "$last" || echo "sudo") ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --all "$@" | less -XF;; - *binary) expr "$(file "$last")" : ".*: .*compress" >/dev/null && /usr/share/nvim/runtime/macros/less.sh "$@";; - *) $elevate bat --style header "$@" --pager 'less -RXF' + (*inode/directory*) tput sgr0 && $(test -x "$last" || echo "sudo") ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --all "$@" | less -XF;; + (*binary) if expr "$(file "$last")" : ".*: .*compress" >/dev/null + then /usr/share/nvim/runtime/macros/less.sh "$@" + fi;; + (*) $elevate bat --style header "$@" --pager 'less -RXF' tput setaf 3 && $elevate stat --format '%A size %sB, birth: %.10w mod %.10y' "$last" ;; esac