Save Bash Completion for all teams added by team

I have a script that allows you to execute Bash processes in the background, I called it "backy". Programs that I want to run in the background I call this:

backy long-running-script param1 param2

The problem is that I lost Bash termination for long-running-scriptif I add another script.

I want to write a Bash termination file that saves not only the Bash termination for long-running-script, but also all its parameters, as well as for all other scripts that I want to call using backy.

I have experience with Bash completion, but I just skipped the command that I can insert into my Bash script completion so that it ends with a script completion that should be called. Any ideas?

My conclusion so far:

have backy &&
_backy_complete()
{
  local cur prev goals

  COMPREPLY=()
  cur=${COMP_WORDS[COMP_CWORD]}

  # How to get the completion from the script that is the param for backy, 
  # in a generic way?
  COMPREPLY=( ????? )
  return 0
} &&
complete -F _backy_complete backy

- :

Lekensteyn Bash script :

complete -F _command backy
+5
1

bash_completion:

complete -F _command backy

sudo, fakeroot . , backy, :

backy --whatever --this --is=ignored not ignored anymore
+4

All Articles