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

Filter out filesystem results better? #1

Open
jolexa opened this issue Jul 27, 2014 · 3 comments
Open

Filter out filesystem results better? #1

jolexa opened this issue Jul 27, 2014 · 3 comments

Comments

@jolexa
Copy link

jolexa commented Jul 27, 2014

Hi,

Thanks for the completion file. The expiring cache is a great feature.

Do you know, is it possible to filter out the "results" coming from the files on disk? Maybe an example can explain better:

% knife
Display all 142 possibilities? (y or n)

@wk8
Copy link
Owner

wk8 commented Jul 27, 2014

Hi @jolexa,

Thanks for your feedback, always appreciate it.

If you want to remove all the results coming from the files on disk, simply remove the -f flag from this line =>

complete -f -F _knife knife

Not sure it was a good idea in the 1st place, might actually remove it.

Please let me know if that helps!

Cheers

@jolexa
Copy link
Author

jolexa commented Jul 27, 2014

Indeed, that is the behavior I expect. Of course, tab completion doesn't
work with "from file ..." like 'knife environment from file ' - I
think a solution might be inspired by
https://github.com/berkshelf/berkshelf-bash-plugin/blob/master/berkshelf-complete.sh#L61-L63

Thanks!

On Sun, Jul 27, 2014 at 12:19 PM, wk8 [email protected] wrote:

Hi @jolexa https://github.com/jolexa,

Thanks for your feedback, always appreciate it.

If you want to remove all the results coming from the files on disk,
simply remove the -f flag on this line =>

complete -f -F _knife knife

Not sure it was a good idea in the 1st place, might actually remove it.

Please let me know if that helps!

Cheers


Reply to this email directly or view it on GitHub
#1 (comment)
.

@wk8
Copy link
Owner

wk8 commented Jul 27, 2014

@jolexa indeed, that's the way to go to include only relevant results from files. But I don't think I'll have time to do that any time soon, so please feel free to submit a PR for that if you do! :-)

Thanks

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

No branches or pull requests

2 participants