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

Feature Request --> cluster-command.sh - completion for a script #50

Open
BradleyA opened this issue Jun 10, 2020 · 3 comments
Open

Feature Request --> cluster-command.sh - completion for a script #50

BradleyA opened this issue Jun 10, 2020 · 3 comments

Comments

@BradleyA
Copy link
Owner

Tell us about your feature request:
A clear and concise description of what you want to happen or the change you would like to see. Use a use case to describe how a person would actually use your request to accomplish a goal. Thank you.

->  https://askubuntu.com/questions/1167193/how-do-i-apply-tab-completion-on-a-script-from-any-directory

Create a completion for particular instance of a shell command, regardless of how it is called (via absolute or relative path), but not others which may share the same name, but be located elsewhere. For instance, you might want completion for a script located at ~/bin/example.sh, but not /usr/bin/example.sh.
https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html

How are you currently working without your feature request?
A description of any alternative solutions or features you've considered or are using today.

-> Not

https://blog.bouzekri.net/2017-01-28-custom-bash-autocomplete-script.html

Bash Tips: Autocompletion
https://www.linux-magazine.com/Online/Features/Bash-Tips-Autocompletion

@BradleyA
Copy link
Owner Author

@BradleyA
Copy link
Owner Author

BradleyA commented Jun 20, 2020

Q. I author/maintain package X and would like to maintain my own completion code for this package. Where should I put it to be sure that interactive bash shells will find it and source it?

A. Install it in one of the directories pointed to by bash-completion's pkgconfig file variables. There are two alternatives:

The recommended directory is completionsdir, which you can get with
 pkg-config --variable=completionsdir bash-completion. From this directory, 
 completions are automatically loaded on demand based on invoked commands' names,
 so be sure to name your completion file accordingly, and to include (for example) symbolic links
 in case the file provides completions for more than one command.
The other directory (which only present for backwards compatibility) is compatdir
 (get it with pkg-config --variable=compatdir bash-completion) from which files are loaded when
 bash_completion is loaded.

@BradleyA
Copy link
Owner Author

BradleyA commented Jul 3, 2020

/usr/share/bash-completion/bash_completion

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

No branches or pull requests

1 participant