Skip to content
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

long option support for tar broken with version 2.4 #98

Open
bitstreamout opened this issue Dec 14, 2016 · 4 comments · May be fixed by #1195
Open

long option support for tar broken with version 2.4 #98

bitstreamout opened this issue Dec 14, 2016 · 4 comments · May be fixed by #1195

Comments

@bitstreamout
Copy link

Try

tar --create --file test.tar <TAB>

does show only option but no files nor directories

tar --create -f test.tar -<TAB>
-A -c -d -r -t -u -x

... the same for mixed options

tar --create -f test.tar <TAB>
tar --create f test.tar <TAB>

@bitstreamout
Copy link
Author

A patch
x.txt

@scop
Copy link
Owner

scop commented Dec 19, 2016

@bitstreamout Could you file a pull request along with test case demonstrating the failure and the fix for this?

@praiskup FYI

@praiskup
Copy link
Contributor

Marking those options as "mode" options looks like a correct fix. Thanks for the patch!

@akinomyoga
Copy link
Collaborator

The issue is still present. Even worse, when completing the word ./, it seems to produce the option names as filenames.

$ tar --create --file a.tar.gz ./[TAB]
./A  ./c  ./d  ./r  ./t  ./u  ./x

yedayak added a commit to yedayak/bash-completion that referenced this issue May 17, 2024
Currently when using long options, we don't complete files to add to the
archive, but show options. Handle long options in tar_mode to fix this.

Fixes scop#98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants