-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an equivalent of bash's 'insert-completions' #6931
Comments
function insert-completions
# We need to remove the descriptions, and we also don't want everything to be inserted on separate lines
commandline -i -- (complete --do-complete | string replace -r '\t.*' '' | string join " ")
end
bind \cg insert-completions triggers it on control-g. |
That's pretty nifty, is it worth formalising as a |
@faho Thanks for your suggestion. I gave it a go, however I had an issue when running
Update: it seems to be |
Yeah, commandline is too zealous about option parsing - it thinks not having a thing to insert is an error worth complaining about. It should just return 1 in that case without saying anything. |
That's just, like, a normal thing to happen. We can return false, but it's not an error worth complaining about. See #6931.
Thanks for making this issue. The solution isn't quite equivalent. For example, typing |
Hello,
I've been looking at the docs for an equivilent in fish of bash's 'insert-completions' function. According to the man page:
My use-case of this is if there is a common prefix in a package and I wish to install/uninstall them. Say I have a bunch of packages that I want to install:
If I were to write
pacman -S xf86-video
and run theinsert-completions
command the list is expanded to the results returned by completion:which then allows me to further edit the command.
The text was updated successfully, but these errors were encountered: