-
Notifications
You must be signed in to change notification settings - Fork 61
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(#100): show CMD for --execute
if --show-cmd
is added
#101
base: main
Are you sure you want to change the base?
feat(#100): show CMD for --execute
if --show-cmd
is added
#101
Conversation
This is perfect! 😍 |
How about defining the --show-cmd flag as a string instead of a boolean? When --show-cmd is passed as an empty string (e.g., --show-cmd=""), it could display the command executed by --execute. If a custom string is provided, that string could be shown instead. This would allow for more flexibility, such as adding icons, custom prompts, or styling. |
Thanks for the feedback @almas1992, I'll try and change it this weekend and see how it turns out. |
@almas1992 This is how it turned out when I change it to a The problem with The other solution would be to have a flag like |
@AlejandroSuero The string flag indeed has this issue; it cannot be passed without a value. To resolve this, you can either add a separate .title flag as you suggested, or manually iterate through os.Args to handle the parameters before passing them to kong for parsing. |
With these changes, if the user adds the flag
--show-cmd
it will print the executed command when using--execute "<cmd>"
.Demo:
show-cmd-flag-demo.mp4
Closes #100