diff options
Diffstat (limited to 'scripts/vic')
| -rwxr-xr-x | scripts/vic | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/vic b/scripts/vic new file mode 100755 index 0000000..d6ca7b1 --- /dev/null +++ b/scripts/vic @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +RED="\e[31m" RESET="\e[0m" + +cmd=$(which "$1" 2>/dev/null) +editor="${EDITOR:-nvim}" + +if [ -z "$cmd" ]; then + printf '\n%b\n' "${RED}Error${RESET}: command not in path or wrong name." +else + "$editor" "$cmd" || exit 0 +fi |
