diff --git a/.config/shell/functions/vvw b/.config/shell/functions/vvw new file mode 100644 index 0000000..fe1d4f8 --- /dev/null +++ b/.config/shell/functions/vvw @@ -0,0 +1,16 @@ +#!/bin/sh +# vvw - "edit (vim) which" +# edit a binary in the path +# usage: +# vvw dotfiles-update.sh nvidia-offload + +vvw() { + t=0 + while [ $# -gt $t ]; do + set -- "$@" "$(which "$1")" + shift + t=$((t+1)) + done + $EDITOR "$@" +} +