daytonaio / daytona

The Open Source Dev Environment Manager.
https://daytona.io
Apache License 2.0
8.11k stars 762 forks source link

The daytona api-key new cannot be copy pasted. #957

Open ivan-burazin opened 3 weeks ago

ivan-burazin commented 3 weeks ago

Describe the bug The daytona api-key new cannot be copy pasted.

To Reproduce daytona api-key new

You can connect to the Daytona Server from a client machine by running:

daytona profile add -a \
https://api-XXXXX.try-eu.daytona.app \
-k **

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

divgro9 commented 3 weeks ago

@Tpuljak image I can see that If we don't use backslash( \ ) then the commands works perfectly fine. also we if we print it in single line then that would be useful because copying text from terminal also add terminal trailing whitespaces which causes problem with the command along with backslash. We can also add ' text copied to your clipboard to improve UX'

Tpuljak commented 3 weeks ago

@Tpuljak image I can see that If we don't use backslash( \ ) then the commands works perfectly fine. also we if we print it in single line then that would be useful because copying text from terminal also add terminal trailing whitespaces which causes problem with the command along with backslash. We can also add ' text copied to your clipboard to improve UX'

@divgro9 all valid points! I also like the auto-copy to clipboard feature.

divgro9 commented 3 weeks ago

@Tpuljak I wanted to ask if there are any specific requirements in repository to add new import of https://pkg.go.dev/golang.design/x/clipboard . also can you point out the folder where i can add this copyToClipBoard function and then use it here in the apikey.go file from where the commands and flags are executed

Tpuljak commented 3 weeks ago

@divgro9 no requirements. You are free to suggest changes in a PR while keeping in mind good code practices.

divgro9 commented 3 weeks ago

@Tpuljak Thank you for your input! I've integrated the clipboard functionality into the api-key new command, making it easier to copy and paste. This update should improve user experience by avoiding issues with trailing whitespaces. Let me know if any further adjustments are necessary, and I’m happy to make changes as needed.

rajivkuma45 commented 2 weeks ago

@idagelic The auto-copy to clipboard is definitely a game changer