bash completions by martinetd · Pull Request #563 · clustershell/clustershell · GitHub
Skip to content

bash completions#563

Merged
thiell merged 4 commits into
clustershell:masterfrom
martinetd:completion
Jan 23, 2025
Merged

bash completions#563
thiell merged 4 commits into
clustershell:masterfrom
martinetd:completion

Conversation

@martinetd

Copy link
Copy Markdown
Collaborator

Just clush for now; might be some bugs but seems to work.

perf-wise it calls cluset -L on every tab, we might need to cache the result somewhere if it is slow in some setups.
(But if user changes conf files it won't be reloaded so that's a bit annoying, it's better not to cache if it's reasonable e.g. just reading the conf files)

Prereq patch makes cluset -s foo -L not list foo groups with the @foo: prefix, like default source with -L -- this allows clush -s foo -w @bar to complete properly.

Comment thread bash_completion.d/clush Outdated
thiell added a commit to thiell/clustershell that referenced this pull request Sep 9, 2024
…ll#563)

Let -s source behave as if it replaces the default group source, and
thus omit the source prefix for the groups in that source.

Part of clustershell#563.
github-merge-queue Bot pushed a commit that referenced this pull request Sep 14, 2024
Let -s source behave as if it replaces the default group source, and
thus omit the source prefix for the groups in that source.

Part of #563.
@thiell

thiell commented Jan 19, 2025

Copy link
Copy Markdown
Collaborator

@thiell thiell added this to the 1.9.3 milestone Jan 19, 2025
thiell added a commit to thiell/clustershell that referenced this pull request Jan 20, 2025
Special command for bash completion that lists group sources, groups in
current source and nodes from groups passed as argument:

cluset --completion [-s source] [groups]

Example:

cluset --completion $*
@martinetd martinetd force-pushed the completion branch 2 times, most recently from 276550c to 2f273dc Compare January 21, 2025 12:44
@thiell thiell self-requested a review January 21, 2025 18:53
Comment thread bash_completion.d/cluset Outdated

@thiell thiell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also investigating a unexpected blank result in some cases

Comment thread bash_completion.d/clush Outdated
thiell added a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
Special command for bash completion that lists group sources, groups in
current source and nodes from groups passed as argument:

cluset --completion [-s source] [groups]

Example:

cluset --completion $*

Part of clustershell#563.
thiell pushed a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
Provide bash completion scripts for clush and cluset/nodeset to
autocomplete group sources, groups and "all" nodes from the
default or selected source.

Part of clustershell#563.
thiell added a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
Special command for bash completion that lists group sources, groups in
current source and nodes from groups passed as argument:

cluset --completion [-s source] [groups]

Example:

cluset --completion @*

Part of clustershell#563.
thiell pushed a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
Provide bash completion scripts for clush and cluset/nodeset to
autocomplete group sources, groups and "all" nodes from the
default or selected source.

Part of clustershell#563.
thiell added a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
thiell added a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
Because it conflicts with xCAT's nodeset command.

Part of clustershell#563.
thiell added a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
thiell added a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
@thiell thiell requested review from thiell and removed request for thiell January 22, 2025 05:50
thiell added a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
thiell added a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
Because it conflicts with xCAT's nodeset command.

Part of clustershell#563.
thiell added a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025
thiell added a commit to martinetd/clustershell that referenced this pull request Jan 22, 2025

@degremont degremont left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this is a very nice work! I'm just not convinced by the missing completion for nodeset

Comment thread bash_completion.d/clush
thiell and others added 3 commits January 22, 2025 21:55
Provide bash completion scripts for clush and cluset/nodeset to
autocomplete group sources, groups and "all" nodes from the
default or selected source.

Part of clustershell#563.
@thiell thiell marked this pull request as ready for review January 23, 2025 06:10
@thiell thiell added this pull request to the merge queue Jan 23, 2025
Merged via the queue into clustershell:master with commit 45a2357 Jan 23, 2025
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.

3 participants