Skip to content

Fix dirname error in shell completions

Markus Koller requested to merge fix-shell-completion into main

What does this Merge Request do and why?

We want to find out the path to the current directory, using $0 causes an error in interactive shells where it's set to e.g. -bash:

$ gdk <TAB>dirname: invalid option -- 'b'
Try 'dirname --help' for more information.

config               install              pristine             reset-data           status               update               
diff-config          kill                 psql                 reset-praefect-data  stop                 version              
doctor               measure              reconfigure          restart              tail                 
help                 measure-workflow     redis-cli            start                thin                 

Looks like this slipped in when we switched from realpath to dirname in e69f5918.

Merge Request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • [-] Tests added for new functionality. If not, please raise Issue to follow-up.
  • [-] Documentation added/updated, if needed.
  • [-] gdk doctor test added, if needed.
  • [-] Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Markus Koller

Merge request reports