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

autorandr: install zsh completions #148678

Merged
merged 1 commit into from
Dec 5, 2021

Conversation

anund
Copy link
Contributor

@anund anund commented Dec 5, 2021

autorandr includes functional zsh completions upstream they just lack
a make target to install the relevant file. For some consistency use the
direct file for both zsh and bash rather than just zsh. Note this
changes the resulting bash completion filename from just 'autorandr' to
'autorandr.bash'

See phillipberndt/autorandr#197

Motivation for this change

Add working auto completion for autorandr to zsh.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@anund
Copy link
Contributor Author

anund commented Dec 5, 2021

cc @coroa @globin autorandr maintainers.

autorandr includes functional zsh completions upstream they just lack
a make target to install the relevant file. For some consistency use the
direct file for both zsh and bash rather than just zsh. Note this
changes the resulting bash completion filename from just 'autorandr' to
'autorandr.bash'

See phillipberndt/autorandr#197
@anund anund force-pushed the fix_autorandr_zsh_completions branch from 54982ea to bdda2cc Compare December 5, 2021 08:47
@@ -23,7 +26,12 @@ stdenv.mkDerivation rec {
runHook preInstall
make install TARGETS='autorandr' PREFIX=$out

make install TARGETS='bash_completion' DESTDIR=$out/share/bash-completion/completions
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if this is doing what's intended. Looking at the makefile I think this works by generating a path like ~$out/share/bash-completion/completions//autorandr

From the makefile https://github.com/phillipberndt/autorandr/blob/1.11/Makefile#L55

install -D -m 644 contrib/bash_completion/autorandr ${DESTDIR}/${BASH_COMPLETIONS_DIR}/autorandr

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2021

Successfully created backport PR #148688 for release-21.11.

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