Cleaning up some scripts and moving to autoload functions

This commit is contained in:
2023-10-08 10:26:30 -04:00
parent 05b36efeea
commit 0f58b00f97
26 changed files with 123 additions and 102 deletions

19
zsh/config/functions/vic Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/zsh
function vic() {
# opens a shell command in $EDITOR
cmd="$(command -v $1)"
[ -f "$cmd" ] \
&& "$EDITOR" "$cmd" \
&& return 0
# if command was not found try the function directory.
cmd="$ZFUNCDIR/$1"
[ -f "$cmd" ] \
&& "$EDITOR" "$cmd" \
&& return 0
echo "Command not found: $1"
return 1
}