From 71cd51b3c772bda967f8df864d621dccf07a8702 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Tue, 8 Apr 2025 01:17:04 -0700 Subject: [PATCH] shell(vvs): init --- .config/shell/bin/vvs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .config/shell/bin/vvs diff --git a/.config/shell/bin/vvs b/.config/shell/bin/vvs new file mode 100755 index 0000000..61bc415 --- /dev/null +++ b/.config/shell/bin/vvs @@ -0,0 +1,15 @@ +#!/bin/bash +# Source this and then run `vvs` +# edit search: find a file and edit it + +# Requires: fd, fzf +# Usage: vvs "Search Term" + +vvs() { + FILE="$(fd | fzf -1 -q "$1" --layout=reverse --info=inline --height=10%)" + if [ $? -eq 0 ]; then + "$EDITOR" "$FILE" + fi +} + +vvs "$@"