Modify user's shell profile to enable/disable shell autocompletion
What does this merge request do and why?
- Adds a new config option
gdk.shell_completionto enable shell completion automatically - Rake task
gdk:shell_completionis added which reads the current shell profile and according to the config option modifies user's shell profile. -
gdk:shell_completiontask is added to rake taskgdk:reconfigure - If an unsupported shell (other then bash and zsh) is detected or a profile is not found, manual setup instructions are shown in output.
Closes: #2498 (closed)
How to set up and validate locally
-
Verify no prior shell completion block in shell profile
-
Enable
gdk.shell_completionconfig option withgdk config set gdk.shell_completion true(Default option is false, with false valuegdk:shell_completionrake task will remove shell completion related bash script load command) -
Run
gdk rake gdk:shell_completionorgdk reconfigureto modify the shell profile, verify the updated shell profile. -
Restart or source the shell profile for changes to take effect with enabled shell completion for gdk.
-
To disable shell completion:
gdk config set gdk.shell_completion truefollowed bygdk rake gdk:shell_completion -
gdk:shell_completionrake task is idempotent, It will detect existence of shell completion block in shell profile and notify the same.
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Merge request checklist
-
This MR references an issue describing the change. -
This change is backward compatible. If not, include steps to communicate to users. -
Tests added for new functionality. If not, raise an issue to follow-up. -
Observability added/updated (logging, metrics, tracing). -
Documentation added/updated. -
Announcement added for notable changes. -
gdk doctortest added.



