Files
dotfiles/dot_local/bin/executable_suv-pick
T

12 lines
405 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/zsh
# suv-pick: suvadu history picker for a kitty split (ctrl+shift+p).
# suv search draws its TUI on stderr and prints the selected command to
# stdout (Esc prints nothing). Run the selection with rc loaded so aliases
# and functions resolve, then drop to an interactive shell.
sel="$(command suv search)"
if [[ -n "$sel" ]]; then
print -ru2 -- "❯ $sel"
zsh -ic -- "$sel"
fi
exec zsh -i