Benutzer-Werkzeuge

Webseiten-Werkzeuge


linux_shell_completion

Linux Shell Auto-Completion with bash

Before reading that below, I hoped, we can do this within our own program, so it would be consistent all the time.

something like this:

int main(int argc, char** args)
{
  if(argc > 0 && args[argc-1][0] == '\t') //  check for TAB as last argument
  {
    printf("--some --suggestions --on --our --own --program --arguments");
    return SPECIAL_CODE_TO_BASH;
  }
}

/etc/bash_completion.d

linux_shell_completion.txt · Zuletzt geändert: 2018/03/26 01:00 von karl