added modular bash command-picker

This commit is contained in:
2026-10-03 16:56:55 -06:00
parent 681efc10f8
commit 0a284d08bc
5 changed files with 87 additions and 8 deletions
@@ -0,0 +1,16 @@
# Command picker using fzf
commands() {
local cmd
cmd=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' ~/.config/commands/linux.txt |
fzf --height 50% --layout=reverse --border --prompt='Command: ')
if [[ -n "$cmd" ]]; then
READLINE_LINE="$cmd"
READLINE_POINT=${#READLINE_LINE}
fi
}
# Ctrl+G opens the command picker
if [[ $- == *i* ]]; then
bind -x '"\C-g": commands'
fi