Emacs shell snippet: notcmd

master
Pierre Neidhardt 2014-01-03 19:05:45 +01:00
parent 6c7add0ac0
commit 9cb4840fca
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# name: ! command ...
# key: notcmd
# --
if ! command -v $1 >/dev/null 2>&1; then
echo >&2 "'$1' not found in PATH. Exiting."
exit 1
fi