Reputation: 1058
I have an little shell script (named "run") which redirects all output of a program to /dev/null:
#!/bin/bash
$@ &> /dev/null &
disown +
How can I say zsh that the whole autocompletion shall work for this?
I mean
$ run git com<TAB>
autocomplete to
$ run git commit
Upvotes: 4
Views: 309
Reputation: 133
I was able to make that work by adding:
compdef _command run
to my .zshrc file.
I've based my answer on this bash question. It was worth giving it a try with compdef - surprisingly it worked. As I'm still zsh/autocompletion newbie I cannot explain the inner workings and you should probably go through the documentation or other sources to find more on the topic.
Upvotes: 2