mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
feat(scripts): add suv-pick script for interactive history selection
This commit is contained in:
1 parent
320d8ee95b
commit
20dc5f4489
1 file changed
+11
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/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
|
||||
Reference in new issue
Block a user