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 `ln` file completion #4090

Closed
wants to merge 1 commit into from
Closed

Fix `ln` file completion #4090

wants to merge 1 commit into from

Conversation

@gechr
Copy link
Contributor

@gechr gechr commented Jun 1, 2017

Fixes #4089

complete -c ln -s s -l symbolic -d 'Make symbolic links instead of hard links'
complete -c ln -l backup -d 'Make a backup of each existing destination file' -a "none off numbered t existing nil simple never"
complete -c ln -s b -d 'Make a backup of each existing destination file'
complete -c ln -s dF -l directory -d 'Allow superuser to attempt to hard link directories'

This comment has been minimized.

@gechr

gechr Jun 1, 2017
Author Contributor

FWIW I also included -F here as a bonus! 😄

› ln --help | grep -w F
  -d, -F, --directory         allow the superuser to attempt to hard link

This comment has been minimized.

@krader1961

krader1961 Jun 1, 2017
Contributor

Note that more than a single letter short option is not documented to work. From the complete documentation:

SHORT_OPTION is a one character option for the command.

And if you press <tab> after typing - then try to select that you get just -d. On the other hand if you type -d and press <tab> it adds the F. Not sure if both behaviors are intentional, accidental, or an error but we probably don't want to rely on it. If you want to support -F as an alias for -s you need a separate completion.

This comment has been minimized.

@gechr

gechr Jun 1, 2017
Author Contributor

Ahh! I think it's less hassle to just remove it. I doubt it's useful to anyone, just noticed it was missing and thought "why not" add it.

Commit updated with -F omitted.

@krader1961
Copy link
Contributor

@krader1961 krader1961 commented Jun 2, 2017

Merged as commt 5e39efa. Thanks, in particular for leaving the -f flag on the version and help flags.

@krader1961 krader1961 closed this Jun 2, 2017
@gechr gechr deleted the gechr:gc-fix-ln-completion branch Jun 2, 2017
@zanchey zanchey added this to the fish 2.7.0 milestone Aug 19, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.