4

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
zvavybir
  • 1,034
  • 6
  • 15

1 Answers1

2

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.

cpt-planet
  • 133
  • 5