Skip to content

Commit

Permalink
Bugfix in print-completion loop for shells other than zsh
Browse files Browse the repository at this point in the history
Bash and other sh type shells only execute the loop for the first element of the `cmds` array using the old code
  • Loading branch information
AndrewDDavis authored and andreafrancia committed May 3, 2024
1 parent eff4485 commit 7bdaf96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ or::
Then::

cmds=(trash-empty trash-list trash-restore trash-put trash)
for cmd in $cmds; do
for cmd in ${cmds[@]}; do
$cmd --print-completion bash | sudo tee /usr/share/bash-completion/completions/$cmd
$cmd --print-completion zsh | sudo tee /usr/share/zsh/site-functions/_$cmd
$cmd --print-completion tcsh | sudo tee /etc/profile.d/$cmd.completion.csh
Expand Down

0 comments on commit 7bdaf96

Please sign in to comment.