Skip to content

Commit

Permalink
go-task: update shell completions (#370166)
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol authored Jan 3, 2025
2 parents e38c2df + 783d48a commit 33216ab
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions pkgs/by-name/go/go-task/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@ buildGoModule rec {
postInstall = ''
ln -s $out/bin/task $out/bin/go-task
installShellCompletion completion/{bash,fish,zsh}/*
substituteInPlace $out/share/bash-completion/completions/task.bash \
--replace-fail 'complete -F _task task' 'complete -F _task task go-task'
substituteInPlace $out/share/fish/vendor_completions.d/task.fish \
--replace-fail 'complete -c $GO_TASK_PROGNAME' 'complete -c $GO_TASK_PROGNAME -c go-task'
substituteInPlace $out/share/zsh/site-functions/_task \
--replace-fail '#compdef task' '#compdef task go-task'
installShellCompletion --cmd task \
--bash <($out/bin/task --completion bash) \
--fish <($out/bin/task --completion fish) \
--zsh <($out/bin/task --completion zsh)
'';

passthru = {
Expand Down

0 comments on commit 33216ab

Please sign in to comment.