bin: slight behavior fixes
This commit is contained in:
parent
22f9c077c8
commit
61b37ec463
|
@ -16,7 +16,7 @@ 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;;
|
||||
(*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 -RF;;
|
||||
(*binary)
|
||||
case "$(file "$last")" in
|
||||
(*:\ *compress*) /usr/share/nvim/runtime/macros/less.sh "$@";;
|
||||
|
@ -24,7 +24,7 @@ case "$($elevate file --dereference --mime "$last")" in
|
|||
esac
|
||||
tput setaf 3 && $elevate stat --format '%A size %sB, birth: %.10w mod %.10y' "$last"
|
||||
;;
|
||||
(*) $elevate bat --style header "$@" --pager 'less -RXF'
|
||||
(*) $elevate bat --style header "$@" --pager 'less -RF'
|
||||
tput setaf 3 && $elevate stat --format '%A size %sB, birth: %.10w mod %.10y' "$last"
|
||||
# TODO don't duplicate stat
|
||||
;;
|
||||
|
|
|
@ -6,6 +6,6 @@ runti() {
|
|||
highlight "$*" && "$@"
|
||||
}
|
||||
cols="$(expr $(tput cols) / $1 / 4 \| 1)"
|
||||
runti timg --grid=${cols} -g $(tput cols)x$(expr $1 \* $cols) "${@:2}"
|
||||
runti timg --title --grid=${cols} -g $(tput cols)x$(expr $1 \* $cols) "${@:2}"
|
||||
runti viu --name -h $1 "${@:2}"
|
||||
runti tiv -h $1 -c $cols "${@:2}"
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
#!/bin/sh
|
||||
# Listing for quick directory switcher based on zoxide and fzf
|
||||
if test -d "$1" -o "$1" = "-"
|
||||
then echo "$@"
|
||||
else
|
||||
set -o noglob
|
||||
zoxide query -sl "$@"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue