mirror of
https://github.com/edu4rdshl/based.fish.git
synced 2026-07-18 07:34:45 +00:00
18 lines
597 B
Fish
18 lines
597 B
Fish
function __based_fzf_popup
|
|
set -l chosen (printf "%s\n" (__based) | fzf --height 50% --reverse --prompt='Command > ' --no-sort --exact --border)
|
|
|
|
if test -n "$chosen"
|
|
if test -n "$chosen"
|
|
commandline -r -- "$chosen"
|
|
commandline -f repaint
|
|
# If BASED_NO_CONFIRMATION is set to a non-zero value, execute the command immediately
|
|
if set -q BASED_NO_CONFIRMATION; and test "$BASED_NO_CONFIRMATION" != 0
|
|
commandline -f execute
|
|
end
|
|
end
|
|
else
|
|
commandline -f repaint
|
|
return
|
|
end
|
|
|
|
end
|