Timeline for How to add pattern to bash completion (for unzip)?
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 11, 2020 at 12:04 | history | edited | CommunityBot |
Commonmark migration
|
|
| Apr 13, 2017 at 12:36 | history | edited | CommunityBot |
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
|
|
| Jan 11, 2014 at 0:25 | history | edited | Runium | CC BY-SA 3.0 |
added 176 characters in body
|
| Jan 11, 2014 at 0:09 | comment | added | Runium | @Alex: Added an update. | |
| Jan 11, 2014 at 0:07 | history | edited | Runium | CC BY-SA 3.0 |
added 1387 characters in body
|
| Jan 10, 2014 at 12:19 | comment | added | Alex |
extglob is activated. The example with 'testing' selects the zip file only again. I notice that test.zip is shown in red color, while test.upd is shown in white color with ls -l, both files empty with same permissions, ownershift and group association. Why does ls distinguish test.zip from test.upd? Maybe this is a hint towards the problem I have?
|
|
| Jan 10, 2014 at 9:27 | comment | added | Runium |
@Alex: You could also update Q with output of shopt …
|
|
| Jan 10, 2014 at 6:22 | comment | added | Runium |
@Alex: Should get completion on both empty and valid files, as well as on files where one do not have permission. Is it the same behavior if you add it to a test script? E.g. 1. some test script with execution set: ~/bin/testing, 2. complete -f -X '!*.@(zip|udp)' testing, 3. testing <tab><tab> ?
|
|
| Jan 10, 2014 at 6:01 | comment | added | Alex |
Thank you very much for your excellent and lengthy explanation, but still it does not work. complete -p unzip yields complete -f -X '!*.@(zip|udp)' unzip, and unzip <tab> completes the file named test.zip. However, the directory contains a file named test.upd as well which is not found by tab completion of unzip. Do the fact of file permissions or a zero length of the file maybe explain this weird behavior?
|
|
| Jan 10, 2014 at 2:57 | history | edited | Runium | CC BY-SA 3.0 |
added 272 characters in body
|
| Jan 10, 2014 at 2:47 | history | answered | Runium | CC BY-SA 3.0 |