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

Add completion for BSD chflags(1) command #1065

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Low-power
Copy link

No description provided.

completions/chflags Outdated Show resolved Hide resolved
completions/chflags Outdated Show resolved Hide resolved
@Low-power
Copy link
Author

Could we use _comp_delimited to support the completion of the comma-separated list?

Yes, that would be more useful.

Which implementations did you reference in preparing the list?

FreeBSD and Darwin.

was_split is only needed when the flag -s is specified to _comp_initialize.

Yep, I forgot to remove this declaration.

@akinomyoga
Copy link
Collaborator

akinomyoga commented Nov 21, 2023

Could we use _comp_delimited to support the completion of the comma-separated list?

Yes, that would be more useful.

was_split is only needed when the flag -s is specified to _comp_initialize.

Yep, I forgot to remove this declaration.

Thank you for those updates.

completions/chflags Outdated Show resolved Hide resolved
completions/chflags Show resolved Hide resolved
for w in "${words[@]}"; do
[[ $w == -R ]] && opts="-H -L -P" && break
done
_comp_compgen -- -W '-f -h -v -R $opts'
Copy link
Owner

Choose a reason for hiding this comment

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

FreeBSD (15.0) has -x.

Suggested change
_comp_compgen -- -W '-f -h -v -R $opts'
_comp_compgen -- -W '-f -h -v -x -R $opts'

Copy link
Collaborator

Choose a reason for hiding this comment

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

If -x is not available in other BSDs, I think we should reference $OSTYPE for -x the same as for the first word.

Copy link
Collaborator

Choose a reason for hiding this comment

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

completions/chflags Outdated Show resolved Hide resolved
@akinomyoga
Copy link
Collaborator

akinomyoga commented Feb 5, 2024

Somehow the CI has failed to start.

https://github.com/scop/bash-completion/actions/runs/7713997204

We recently updated the version of release-please-action in #1075. @Low-power Could you rebase it again on top of the latest master?

@akinomyoga
Copy link
Collaborator

I rebased. I also added links to the references in commit 5bd938b.

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 this pull request may close these issues.

3 participants