Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: install tedge tab completions during installation #3407

Conversation

reubenmiller
Copy link
Contributor

Proposed changes

Install the shell completions during the tedge post installation phase if the detected shell scripts are found.

Adding the script as part of the installation allows for a more seamless completion experience as sometimes no setup needs to be done if the user has already enabled shell completion for their preferred shell.

The system test image now includes the shell completion out of the box to help developers during testing and demos.

Note: The shell completion script is added as part of the post installation and not a static file as the clap generated script will use the full path to the binary that called the tedge completions command which makes running at build time problematic as it would use the build time path of the tedge binary instead of the destinations path.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@reubenmiller reubenmiller added theme:cli Theme: cli related topics theme:packaging Theme: Packaging and release artefact topics skip-release-notes Don't include the ticket in the auto generated release notes labels Feb 17, 2025
@reubenmiller reubenmiller force-pushed the feat-install-completion-scripts-during-installation branch from 922ab16 to 0a74778 Compare February 17, 2025 16:13
@reubenmiller reubenmiller force-pushed the feat-install-completion-scripts-during-installation branch from 0a74778 to 1d2a551 Compare February 17, 2025 16:13
Copy link
Contributor

github-actions bot commented Feb 17, 2025

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
585 0 3 585 100 1h32m22.818836999s

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

I only checked things related to zsh.

@reubenmiller
Copy link
Contributor Author

Approved.

I only checked things related to zsh.

Though the system tests include all three shells (bash, zsh and fish) and the profile changes are part of the container definition, so any system test can be used to try it out.

Copy link
Member

@rina23q rina23q left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small correction in docs.

@reubenmiller reubenmiller force-pushed the feat-install-completion-scripts-during-installation branch from 1d2a551 to 1d0cc5e Compare February 19, 2025 11:24
@reubenmiller reubenmiller added this pull request to the merge queue Feb 19, 2025
Merged via the queue into thin-edge:main with commit f824882 Feb 19, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-release-notes Don't include the ticket in the auto generated release notes theme:cli Theme: cli related topics theme:packaging Theme: Packaging and release artefact topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants