set-option global autocomplete prompt define-command foo %{ prompt -shell-script-candidates %{ printf 'foo\nbar\nhaz\n' } ': ' %{exec i %val{text} } }