bin: improve scripts for testing
This commit is contained in:
parent
6eb61dc70b
commit
08c1dcd2d7
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
{
|
{
|
||||||
echo "$# Args: $@"
|
echo "$# Args: $@"
|
||||||
echo "${@:-default}" | sed 's/\w\+/\0-w/g'
|
#echo "${@:-default}" | sed 's/\w\+/\0-w/g'
|
||||||
for last; do true; done
|
for last; do true; done
|
||||||
echo "Last arg: $last"
|
echo "Last arg: $last"
|
||||||
} | tee /tmp/args$(date +%s)
|
} | tee /tmp/args$(date +%s)
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Compare select terminal image viewers
|
||||||
|
# Args: <height> [images]...
|
||||||
|
runti() {
|
||||||
|
which "$1" >/dev/null &&
|
||||||
|
highlight "$*" && "$@"
|
||||||
|
}
|
||||||
|
cols="$(expr $(tput cols) / $1 / 4 \| 1)"
|
||||||
|
runti timg --grid=${cols} -g $(tput cols)x$(expr $1 \* $cols) "${@:2}"
|
||||||
|
runti viu --name -h $1 "${@:2}"
|
||||||
|
runti tiv -h $1 -c $cols "${@:2}"
|
Loading…
Reference in New Issue