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

feat(cli): added supported for shell completions #580

Merged
merged 2 commits into from
Oct 14, 2023

Conversation

rootCircle
Copy link
Contributor

Introduction

Added opt-in shell completions support for bash, zsh and fish shells

Generating completions

  1.  auto-cpufreq --completions=zsh # shell name
  2. Copy the displayed command and run it once! Voila! you have the completions working
  3. Restart the shell or source <rc-file>

Screenshots

Screenshot

Resources

@AdnanHodzic
Copy link
Owner

AdnanHodzic commented Oct 14, 2023

@rootCircle lgtm!

Couple of remarks:

1: let's add explanation of --completions flag to https://github.com/AdnanHodzic/auto-cpufreq/#how-to-run-auto-cpufreq

2: Why not suggest "Restart the shell or source " part here:

sudo auto-cpufreq --completions=zsh
Run the below command in your current shell!

echo 'eval "$(_AUTO_CPUFREQ_COMPLETE=zsh_source auto-cpufreq)"' >> ~/.zshrc
source ~/.zshrc

Think it would be a better flow.

@rootCircle
Copy link
Contributor Author

Why not suggest "Restart the shell or source " part here:

Yes, this will be more elegant from user POV, I am making the required changes :-)

@AdnanHodzic
Copy link
Owner

Why not suggest "Restart the shell or source " part here:

Yes, this will be more elegant from user POV, I am making the required changes :-)

Perfect :)

@AdnanHodzic AdnanHodzic merged commit 5bf295d into AdnanHodzic:master Oct 14, 2023
shadeyg56 pushed a commit to shadeyg56/auto-cpufreq that referenced this pull request Feb 12, 2024
* feat: added supported for shell completions

* docs: completions flag instructions
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.

2 participants