diff options
| author | ryukamish <[email protected]> | 2026-04-11 18:25:38 +0530 |
|---|---|---|
| committer | ryukamish <[email protected]> | 2026-04-11 18:25:38 +0530 |
| commit | b3474e85dcce03e7de0b4a4e30ff7fad1f38ee26 (patch) | |
| tree | bcfe42ad76a825c283eec653140ab4052f0b3017 /scripts/vic | |
| parent | 607891801fbf2051a0c9062d15a445dd238c1e1b (diff) | |
add: small bash scripts for added functionality
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 |
