You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
is there a way to create tab completion within a function?
The complete feature of fish seems to give the ability to have arguments passed to a function, but let say I have a function foo
which, when invoke, can ask the user a choice, like "do_this" or "do_that", available and select-able with the keyboard arrows?
A bit like when you do a "cd" and press tab, you have the list of the folders you can go into.
That would replace a code like echo "Enter do_this or do_that"; read USER_RESPONSE
with ideally something easy to use like read_pre-defined_choice' USER_RESPONSE ('do_this do_that')
Which would save the user from typing "do_this" or "do_that"
Thanks
The text was updated successfully, but these errors were encountered:
fish 3.1.2
ubuntu 18.04
Hello,
is there a way to create tab completion within a function?
The complete feature of fish seems to give the ability to have arguments passed to a function, but let say I have a function foo
which, when invoke, can ask the user a choice, like "do_this" or "do_that", available and select-able with the keyboard arrows?
A bit like when you do a "cd" and press tab, you have the list of the folders you can go into.
That would replace a code like
echo "Enter do_this or do_that"; read USER_RESPONSE
with ideally something easy to use like
read_pre-defined_choice' USER_RESPONSE ('do_this do_that')
Which would save the user from typing "do_this" or "do_that"
Thanks
The text was updated successfully, but these errors were encountered: