bin/b: fix exit code for uncompressed binary
This commit is contained in:
parent
620b628ba5
commit
50f3d4bef1
|
@ -16,9 +16,11 @@ test -x "$(dirname "$last")" &&
|
||||||
tput setaf 4 && $elevate file -E "$last" | ( grep -v --color=never 'directory$' || true )
|
tput setaf 4 && $elevate file -E "$last" | ( grep -v --color=never 'directory$' || true )
|
||||||
|
|
||||||
case "$($elevate file --dereference --mime "$last")" in
|
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;;
|
(*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 "$@";;
|
(*binary) if expr "$(file "$last")" : ".*: .*compress" >/dev/null
|
||||||
*) $elevate bat --style header "$@" --pager 'less -RXF'
|
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"
|
tput setaf 3 && $elevate stat --format '%A size %sB, birth: %.10w mod %.10y' "$last"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue