-
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
Make tab-completion with wildcards make more sense #954
Labels
Milestone
Comments
Yep, that's weird all right. |
Can definitely +1 on this. It's actually highly misleading: $ touch (seq 1 9)abc(seq 1 9)
$ ls
1abc1 1abc4 1abc7 2abc1 2abc4 2abc7 3abc1 3abc4 3abc7 4abc1 4abc4 4abc7 5abc1 5abc4 5abc7 6abc1 6abc4 6abc7 7abc1 7abc4 7abc7 8abc1 8abc4 8abc7 9abc1 9abc4 9abc7
1abc2 1abc5 1abc8 2abc2 2abc5 2abc8 3abc2 3abc5 3abc8 4abc2 4abc5 4abc8 5abc2 5abc5 5abc8 6abc2 6abc5 6abc8 7abc2 7abc5 7abc8 8abc2 8abc5 8abc8 9abc2 9abc5 9abc8
1abc3 1abc6 1abc9 2abc3 2abc6 2abc9 3abc3 3abc6 3abc9 4abc3 4abc6 4abc9 5abc3 5abc6 5abc9 6abc3 6abc6 6abc9 7abc3 7abc6 7abc9 8abc3 8abc6 8abc9 9abc3 9abc6 9abc9
wfletcher@purple
$ ls \*abc\*7 #hit me that TAB key||
*abc*1 *abc*3 *abc*5 *abc*7 *abc*9
*abc*2 *abc*4 *abc*6 *abc*8 |
This was referenced Aug 17, 2016
ridiculousfish
added a commit
to ridiculousfish/fish-shell
that referenced
this issue
Dec 29, 2021
Prior to this change, if you tab-completed a token with a wildcard (glob), we would invoke ordinary completions. Instead, expand the wildcard, replacing the wildcard with the result of expansions. If the wildcard fails to expand, flash the command line to signal an error and do not modify it. Example: > touch file(seq 4) > echo file*<tab> becomes: > echo file1 file2 file3 file4 whereas before the tab would have just added a space. Some things to note: 1. If the expansion would produce more than 256 items, we flash the command line and do nothing, since it would make the commandline overfull. 2. The wildcard token can be brought back through Undo (ctrl-Z). Fixes fish-shell#954.
ridiculousfish
added a commit
to ridiculousfish/fish-shell
that referenced
this issue
Dec 29, 2021
Prior to this change, if you tab-completed a token with a wildcard (glob), we would invoke ordinary completions. Instead, expand the wildcard, replacing the wildcard with the result of expansions. If the wildcard fails to expand, flash the command line to signal an error and do not modify it. Example: > touch file(seq 4) > echo file*<tab> becomes: > echo file1 file2 file3 file4 whereas before the tab would have just added a space. Some things to note: 1. If the expansion would produce more than 256 items, we flash the command line and do nothing, since it would make the commandline overfull. 2. The wildcard token can be brought back through Undo (ctrl-Z). Fixes fish-shell#954.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
This autocompletes to
f*ile
. It should autocomplete tofile*
orfile
, imo.Tab completion with wildcards is pretty awkward at the moment.
The text was updated successfully, but these errors were encountered: