Re:Show HN: Shelly: Write Terminal Commands in English
by chungus on Tuesday January 16, 2024 @06:29AM
(#39012114)
Is there a cowboy mode, where I can skip this step and 'just run it'? (excuse me if this is mentioned in the docs)
Re:Show HN: Shelly: Write Terminal Commands in English
by Name_Chawps on Tuesday January 16, 2024 @11:06AM
(#39014906)
Doesn't look like it.
Re:Show HN: Shelly: Write Terminal Commands in English
by paletov on Wednesday January 17, 2024 @02:01AM
(#39024224)
It's too early for cowboy mode. The LLM isn't reliable enough to let it run commands without approving them first.
As others noted, "try" could be used to make the commands testable, so I'll look into it this weekend.
Re:Show HN: Shelly: Write Terminal Commands in English
by alentred on Tuesday January 16, 2024 @08:58AM
(#39013311)
zsh can replace special variables like `!!` and `!:1` inline when you hit Tab. Or, if you hit Enter, it won't execute the command itself but prepare a new prompt pre-filled with the same command and all special variables substituted to their values. I don't really know how it works in zsh (bash for example doesn't warn you and just executes the command right away with the actual values in place), but anyway it may be more seamless than opening an editor.
It opens the command in an editor like when you run "git commit", so you can edit it. Saving executes the final version.