bin: fix little issues in b
This commit is contained in:
parent
bd25412eeb
commit
8a8f31219e
|
@ -22,7 +22,8 @@ while getopts "$opts" OPTION; do
|
|||
# inspect: Show file info without preview
|
||||
(i) inspect=true;;
|
||||
(t) tree=true;;
|
||||
(v) set -eo xtrace;;
|
||||
(v) set -eo xtrace;
|
||||
export PS4='+\#> ';;
|
||||
(h|?) echo "Usage: $(basename $0) [-$opts] <paths...>" && exit 2;;
|
||||
esac
|
||||
done
|
||||
|
@ -65,7 +66,7 @@ for arg; do
|
|||
fi
|
||||
# amount of columns in a grid
|
||||
grid=$(expr $(tput cols) / \( 25 - \( $# / 2 \) \& $# \< 30 \| 5 \))
|
||||
tmpfile="$prefix/$(basename "$arg")_$(dd "if=$arg" bs=512 count=10 2>/dev/null | md5sum | tr -d ' ')"
|
||||
tmpfile="$prefix/$(basename "$arg")_$(dd "if=$arg" bs=512 count=10 2>/dev/null | md5sum | tr -d ' ' || true)"
|
||||
mkdir -p "$prefix"
|
||||
case "$mime" in
|
||||
(*\ application/pdf\;*)
|
||||
|
@ -193,7 +194,8 @@ if test "$bat" -o "$batplain"; then
|
|||
cp "$file" "$txt"
|
||||
timgtxt+=("$txt")
|
||||
done
|
||||
timg -V --grid="$(expr 4 \& ${#bat[@]} \> 5 \| ${#bat[@]})" --title="%b" --frames=3 "${timgtxt[@]}"
|
||||
timg -V --grid="$(expr 4 \& ${#bat[@]} \> 5 \| ${#bat[@]})" --title="%b" --frames=3 "${timgtxt[@]}" ||
|
||||
head -3 "${timgtxt[@]}"
|
||||
#fileinfo "${bat[@]}"
|
||||
;;
|
||||
(*) for file in "${bat[@]}"; do
|
||||
|
|
|
@ -29,7 +29,7 @@ case "$cmd" in
|
|||
# Non-standard help flags
|
||||
(doom) "$@" --help;;
|
||||
(mpw) "$@" -h 2>&1 | $paginate;;
|
||||
(plantuml) unbuffer "$@" -help | $paginate;;
|
||||
(plantuml|java) unbuffer "$@" -help | $paginate;;
|
||||
(rails) { "$@" -H && "$@" --help; } | $paginate;;
|
||||
(vlc) shift && unbuffer vlc --full-help "$@" | $paginate;;
|
||||
(kdeconnect*) shift && kdeconnect-cli --help-all "$@" | $paginate;;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh -ex
|
||||
# Install syncthingtray with dependencies
|
||||
suffix=$1
|
||||
yay --noconfirm -Syyu --nobatchinstall c++utilities$suffix qtforkawesome$suffix qtutilities$suffix
|
||||
yay --noconfirm -S syncthingtray$suffix
|
||||
|
|
Loading…
Reference in New Issue