Skip to content

[BUG] Bash completion not working #170

@comio

Description

@comio

Description

On my system (gentoo linux + bash 5.3.3) the completion works only for "completion" sub command.

GitKraken CLI Version

3.1.45

OS Version

  • Gentoo Linux
  • Bash 5.3.3(1)

Git Version

git version 2.51.2

Logs, Screenshots, Screen Captures, URLs, etc

I tried to digit "gk version" and "gk completion" given a bounce of tabs:

========= starting completion logic ==========
cur is , words[*] is gk , #words[@] is 2, cword is 1
Truncated words[*]: gk ,
lastParam , lastChar 
Adding extra empty parameter
Calling gk __complete  ''
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 9

========= starting completion logic ==========
cur is , words[*] is gk , #words[@] is 2, cword is 1
Truncated words[*]: gk ,
lastParam , lastChar 
Adding extra empty parameter
Calling gk __complete  ''
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 63

========= starting completion logic ==========
cur is , words[*] is gk , #words[@] is 2, cword is 1
Truncated words[*]: gk ,
lastParam , lastChar 
Adding extra empty parameter
Calling gk __complete  ''
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 63

========= starting completion logic ==========
cur is , words[*] is gk , #words[@] is 2, cword is 1
Truncated words[*]: gk ,
lastParam , lastChar 
Adding extra empty parameter
Calling gk __complete  ''
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 63
 ver
========= starting completion logic ==========
cur is ver, words[*] is gk ver, #words[@] is 2, cword is 1
Truncated words[*]: gk ver,
lastParam ver, lastChar r
Calling gk __complete ver
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 9

========= starting completion logic ==========
cur is ver, words[*] is gk ver, #words[@] is 2, cword is 1
Truncated words[*]: gk ver,
lastParam ver, lastChar r
Calling gk __complete ver
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 63

========= starting completion logic ==========
cur is ver, words[*] is gk ver, #words[@] is 2, cword is 1
Truncated words[*]: gk ver,
lastParam ver, lastChar r
Calling gk __complete ver
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 63

========= starting completion logic ==========
cur is ver, words[*] is gk ver, #words[@] is 2, cword is 1
Truncated words[*]: gk ver,
lastParam ver, lastChar r
Calling gk __complete ver
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 63

========= starting completion logic ==========
cur is ver, words[*] is gk ver, #words[@] is 2, cword is 1
Truncated words[*]: gk ver,
lastParam ver, lastChar r
Calling gk __complete ver
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 63
sion
========= starting completion logic ==========
cur is version, words[*] is gk version, #words[@] is 2, cword is 1
Truncated words[*]: gk version,
lastParam version, lastChar n
Calling gk __complete version
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 9

========= starting completion logic ==========
cur is version, words[*] is gk version, #words[@] is 2, cword is 1
Truncated words[*]: gk version,
lastParam version, lastChar n
Calling gk __complete version
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 63

CLI Core: 3.1.46
CLI Installer: 3.1.45
09:12:50 ✔ comio@smo-mantel:~ $ gk compl
========= starting completion logic ==========
cur is compl, words[*] is gk compl, #words[@] is 2, cword is 1
Truncated words[*]: gk compl,
lastParam compl, lastChar l
Calling gk __complete compl
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 9

========= starting completion logic ==========
cur is compl, words[*] is gk compl, #words[@] is 2, cword is 1
Truncated words[*]: gk compl,
lastParam compl, lastChar l
Calling gk __complete compl
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 63
etion
========= starting completion logic ==========
cur is completion, words[*] is gk completion, #words[@] is 2, cword is 1
Truncated words[*]: gk completion,
lastParam completion, lastChar n
Calling gk __complete completion
The completion directive is: 0
The completions are: 
__gk_handle_completion_types: COMP_TYPE is 9

Generate the autocompletion script for gk for the specified shell.
See each sub-command's help for details on how to use the generated script.

Usage:
  gk completion [command]

Available Commands:
  bash        Generate the autocompletion script for bash
  fish        Generate the autocompletion script for fish
  powershell  Generate the autocompletion script for powershell
  zsh         Generate the autocompletion script for zsh

Flags:
  -h, --help   help for completion

Use "gk completion [command] --help" for more information about a command.
09:13:00 ✔ comio@smo-mantel:~ $ gk completion 
========= starting completion logic ==========
cur is , words[*] is gk completion , #words[@] is 3, cword is 2
Truncated words[*]: gk completion ,
lastParam , lastChar 
Adding extra empty parameter
Calling gk __complete completion  ''
The completion directive is: 4
The completions are: bash       Generate the autocompletion script for bash
fish    Generate the autocompletion script for fish
powershell      Generate the autocompletion script for powershell
zsh     Generate the autocompletion script for zsh

Activating no file completion
__gk_handle_completion_types: COMP_TYPE is 9
Original comp: bash     Generate the autocompletion script for bash
Final comp: bash        (Generate the autocompletion script for bash)
Original comp: fish     Generate the autocompletion script for fish
Final comp: fish        (Generate the autocompletion script for fish)
Original comp: powershell       Generate the autocompletion script for powershell
Final comp: powershell  (Generate the autocompletion script for powershell)
Original comp: zsh      Generate the autocompletion script for zsh
Final comp: zsh         (Generate the autocompletion script for zsh)

bash        (Generate the autocompletion script for bash)        powershell  (Generate the autocompletion script for powershell)  
fish        (Generate the autocompletion script for fish)        zsh         (Generate the autocompletion script for zsh)         
09:13:00 ✔ comio@smo-mantel:~ $ gk completion 
========= starting completion logic ==========
cur is , words[*] is gk completion , #words[@] is 3, cword is 2
Truncated words[*]: gk completion ,
lastParam , lastChar 
Adding extra empty parameter
Calling gk __complete completion  ''
The completion directive is: 4
The completions are: bash       Generate the autocompletion script for bash
fish    Generate the autocompletion script for fish
powershell      Generate the autocompletion script for powershell
zsh     Generate the autocompletion script for zsh

Activating no file completion
__gk_handle_completion_types: COMP_TYPE is 63
Original comp: bash     Generate the autocompletion script for bash
Final comp: bash        (Generate the autocompletion script for bash)
Original comp: fish     Generate the autocompletion script for fish
Final comp: fish        (Generate the autocompletion script for fish)
Original comp: powershell       Generate the autocompletion script for powershell
Final comp: powershell  (Generate the autocompletion script for powershell)
Original comp: zsh      Generate the autocompletion script for zsh
Final comp: zsh         (Generate the autocompletion script for zsh)

Generate the autocompletion script for gk for the specified shell.
See each sub-command's help for details on how to use the generated script.

Usage:
  gk completion [command]

Available Commands:
  bash        Generate the autocompletion script for bash
  fish        Generate the autocompletion script for fish
  powershell  Generate the autocompletion script for powershell
  zsh         Generate the autocompletion script for zsh

Flags:
  -h, --help   help for completion

Use "gk completion [command] --help" for more information about a command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions