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

Fix tab completion of directories and filenames #3184

Merged
merged 1 commit into from Feb 20, 2017

Conversation

adamjstewart
Copy link
Member

compgen does not work the way I expected. compgen -o filenames doesn't list any results. If I use compgen -o filenames -A file or compgen -o default, it will list results, but directories will not have a / appended. The only way to get this working is to use complete -o default. This has the unfortunate side-effect of adding directories/filenames as possible values any time there are no other possible results, but I don't see a better way around this.

P.S. I just noticed that spack install [] will list all packages, but spack install gcc [] will list no results (will now list filenames/directories). I wonder if I can fix this (in another PR).

@tgamblin tgamblin merged commit f0e9945 into spack:develop Feb 20, 2017
@tgamblin
Copy link
Member

@adamjstewart: does bash completion use its own columnizer? I noticed the suggested completion output seems to use fixed-width columns, which are not as nice as the variable-width, GNU ls-like ones colify will give you. Minor thing but just wondering.

@adamjstewart
Copy link
Member Author

Not sure, I'm certainly not doing my own columnizing, so it must be.

@adamjstewart adamjstewart deleted the fixes/tab-completion branch March 24, 2017 22:10
diaena pushed a commit to diaena/spack that referenced this pull request May 26, 2017
xavierandrade pushed a commit to xavierandrade/spack that referenced this pull request Jun 16, 2017
healther pushed a commit to electronicvisions/spack that referenced this pull request Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants