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 zsh fish bash completion support #855

Closed
wants to merge 1 commit into from
Closed

Conversation

niT-Tin
Copy link

@niT-Tin niT-Tin commented Jun 12, 2023

Add zsh fish bash completion support

Place the completion file of the corresponding shell in the completion folder in the specified location

@niT-Tin niT-Tin requested review from meain and Peltoche as code owners June 12, 2023 16:39
@muniu-bot
Copy link

muniu-bot bot commented Jun 12, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: niT-Tin

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@niT-Tin
Copy link
Author

niT-Tin commented Jun 12, 2023

and the specific effect is as follows
bash
lsdbash
zsh
lsdzsh
fish
lsdfish

@nim65s
Copy link
Contributor

nim65s commented Jun 25, 2023

Hi,

What is the point of adding those generated files here ?

I think this should be closed in favor of #861, or something like that.

@niT-Tin
Copy link
Author

niT-Tin commented Jun 25, 2023

Oh, thank you for your reminder. I did not notice that there was already a completion operation, but using LSD on my computer did not have this effect, so I wrote these shell completion myself. If there is no problem running lsd completion on someone else, then this pr can indeed be closed

@nim65s
Copy link
Contributor

nim65s commented Jun 25, 2023

@niT-Tin
Copy link
Author

niT-Tin commented Jun 25, 2023

Arch already provide them : https://gitlab.archlinux.org/archlinux/packaging/packages/lsd/-/blob/main/PKGBUILD#L42-L44 Nix too: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/lsd/default.nix#L28

You probably just need to set SHELL_COMPLETIONS_DIR

Wow, thanks, I'll try

@zwpaper
Copy link
Member

zwpaper commented Aug 15, 2023

lsd/build.rs

Lines 32 to 35 in 8acaabe

generate_to(Bash, &mut app, bin_name, &outdir).expect("Failed to generate Bash completions");
generate_to(Fish, &mut app, bin_name, &outdir).expect("Failed to generate Fish completions");
generate_to(Zsh, &mut app, bin_name, &outdir).expect("Failed to generate Zsh completions");
generate_to(PowerShell, &mut app, bin_name, &outdir)

we already support this

/close

@muniu-bot muniu-bot bot closed this Aug 15, 2023
@muniu-bot
Copy link

muniu-bot bot commented Aug 15, 2023

@zwpaper: Closed this PR.

In response to this:

lsd/build.rs

Lines 32 to 35 in 8acaabe

generate_to(Bash, &mut app, bin_name, &outdir).expect("Failed to generate Bash completions");
generate_to(Fish, &mut app, bin_name, &outdir).expect("Failed to generate Fish completions");
generate_to(Zsh, &mut app, bin_name, &outdir).expect("Failed to generate Zsh completions");
generate_to(PowerShell, &mut app, bin_name, &outdir)

we already support this

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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