diff --git a/completion/generate_completions.py b/completion/generate_completions.py index eaaaa6f..bde5af5 100644 --- a/completion/generate_completions.py +++ b/completion/generate_completions.py @@ -22,8 +22,7 @@ import sys if len(sys.argv) != 3: print('{}: wrong arguments'.format(sys.argv[0]), file=sys.stderr) - print('Usage: {} [SOURCE DIR] [COMPLETION TYPE]'.format( - sys.argv[0]), file=sys.stderr) + print('Usage: {} [SOURCE DIR] [COMPLETION TYPE]'.format(sys.argv[0]), file=sys.stderr) print() print("SOURCE DIR is path to the Toolbox Go source code") print("COMPLETION TYPE is either 'bash', 'zsh' or 'fish'") @@ -34,11 +33,9 @@ completion_type = sys.argv[2] try: os.chdir(source_dir) - output = subprocess.run( - ['go', 'run', '.', '__completion', completion_type], check=True) + output = subprocess.run(['go', 'run', '.', 'completion', completion_type], check=True) except subprocess.CalledProcessError as e: - print('{}: go run returned non-zero exit status {}'.format( - sys.argv[0], e.returncode), file=sys.stderr) + print('{}: go run returned non-zero exit status {}'.format(sys.argv[0], e.returncode), file=sys.stderr) sys.exit(e.returncode) sys.exit(0) diff --git a/src/cmd/completion.go b/src/cmd/completion.go index 3bc3c08..0325e7e 100644 --- a/src/cmd/completion.go +++ b/src/cmd/completion.go @@ -26,7 +26,7 @@ import ( ) var completionCmd = &cobra.Command{ - Use: "__completion", + Use: "completion", Short: "Generate completion script", Hidden: true, DisableFlagsInUseLine: true,