3 ms·
For any shell command where a minor mistake has the potential of ruining your day, take a look at “try”, which will allow you to inspect the effects before runn
by vlowrian 3y ago
For any shell command where a minor mistake has the potential of ruining your day, take a look at “try”, which will allow you to inspect the effects before running it against a live system: https://github.com/binpash/try https://github.com/binpash/try
- maaaaattttt 3y agoThat's a great tool! Hope OP's sees this. If the default would be to use "try" when using shelly and I just had to "commit [Y/n]" at the end, then I would seriously consider using it. One could do something like `shelly "my description" --force` to bypass the "try" usage.
- philipwhiuk 3y ago> Please note that try is a prototype and not a full sandbox, and should not be used to execute commands that you don't already trust on your system, (i.e. network calls are all allowed)
- vlowrian 3y agoTrue, ‘try’ won’t make reading and understanding a command obsolete, but it’s a great tool to prevent accidental deletion of important files, like OP described.
- samstave 3y agoI was taught that Try was to be sure your command was well formed, if its a complex command with some regex for example... Though I have not used it much over the years, as I havent had to do much personal regex for a long while.