On 5/15/25 11:42, pe...@easthope.ca wrote:
Hi,
Given this function.
ev () { case $# in
0) /usr/bin/evince --display=:0 ;;
1) /usr/bin/evince --display=:0 $1 ;;
*) echo "Too many arguments." ;; esac }
Can improvements be suggested?
When you refer to a variable you should wrap it in double quotes, unless
you're absolutely sure it contains only shell-safe characters, or it
doesn't matter if it doesn't.
Error messages should probably go to stderr, >&2 .
I think your spacing is weird, but I tend to the verbose. It should
work fine as is.