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

Automate Shell Completion Configuration for daytona to Enhance User Experience #49

Closed
nkkko opened this issue Feb 27, 2024 · 9 comments · Fixed by #139
Closed

Automate Shell Completion Configuration for daytona to Enhance User Experience #49

nkkko opened this issue Feb 27, 2024 · 9 comments · Fixed by #139
Assignees

Comments

@nkkko
Copy link
Member

nkkko commented Feb 27, 2024

Daytona provides a way to generate the shell completion script but requires users to integrate it into their shell environment manually. The user must capture the output, create a file in the appropriate directory, and then modify their shell's configuration file to source this script.

Suggested Enhancement

I propose enhancing the daytona CLI with functionality to automate the integration of shell completions. This enhancement could work as follows:

Automatic Detection and Configuration: Extend daytona with a command that not only generates the completion script but also detects the user's shell type and automatically places the script in the correct location.

Modification of Shell Configuration Files: For shells like Zsh, which may require the user to add a directory to their $fpath, the tool could either automatically update .zshrc or prompt the user with the specific line to add.

Immediate Activation: Provide an option to immediately source the new completion script or instruct the user to restart their shell session to activate the completions.

Considerations

The tool should respect user preferences and offer options rather than making changes without consent.
Implementing a cross-shell solution that accommodates the differences between Bash, Zsh, and possibly others.
Providing clear instructions and feedback during the process to ensure users understand what changes are being made.

@nkkko nkkko added the good first issue Good for newcomers label Feb 28, 2024
Copy link

algora-pbc bot commented Mar 7, 2024

💎 $30 bounty created by daytonaio
🙋 If you start working on this, comment /attempt #49 along with your implementation plan
👉 To claim this bounty, submit a pull request that includes the text /claim #49 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to daytonaio/daytona!

👉 Add a bountyShare on socials

If no one is assigned to the issue, feel free to tackle it, without confirmation from us, after registering your attempt. In the event that multiple PRs are made from different people, we will generally accept those with the cleanest code.

Attempt Started (GMT+0) Solution
🟢 @35C4n0r Mar 7, 2024, 3:27:10 PM #139

@35C4n0r
Copy link
Contributor

35C4n0r commented Mar 7, 2024

I would like to attempt it. Kindly assign it to me @nkkko
/attempt #49

@35C4n0r
Copy link
Contributor

35C4n0r commented Mar 8, 2024

@nkkko waiting to be assigned.

@35C4n0r
Copy link
Contributor

35C4n0r commented Mar 8, 2024

@Tpuljak Sorry for pinging, I saw this #118 (comment), and just thought it would be better to get assigned first.

@Tpuljak
Copy link
Member

Tpuljak commented Mar 8, 2024

Hi @35C4n0r,

Thanks for your interest! Good luck with solving the issue.

@35C4n0r
Copy link
Contributor

35C4n0r commented Mar 8, 2024

@Tpuljak I read the issue description and IMHO we should let the user decide the shell they want to configure the auto-completion for like autocomplete bash. What are your thoughts on this?

@Tpuljak
Copy link
Member

Tpuljak commented Mar 8, 2024

@Tpuljak I read the issue description and IMHO we should let the user decide the shell they want to configure the auto-completion for like autocomplete bash. What are your thoughts on this?

@35C4n0r you're right. You don't have to do automatic shell detection, let the user decide. The most relevant part of the issue is the automatic injection of the autocomplete script into the appropriate shell profile and then instructing the user on how to source the file (or instruct to open a new terminal).

Copy link

algora-pbc bot commented Mar 8, 2024

💡 @35C4n0r submitted a pull request that claims the bounty. You can visit your bounty board to reward.

Copy link

algora-pbc bot commented Mar 11, 2024

🎉🎈 @35C4n0r has been awarded $30! 🎈🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants