From 57a60da3a0d912612b3e4eea963af0718827640f Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 17 Jan 2024 17:32:07 -0800 Subject: [PATCH] shell: add vvw --- .config/shell/functions/vvw | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .config/shell/functions/vvw 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 "$@" +} +