Lurker News
I built this terminal native runtime for Fig's autocomplete to support Windows and Linux. Would appreciate any feedback on it!

Comments (148) 33 threads

Show all comments

Showing thread 3 of 33

monkellipse3 replies#
Great idea! Also terrifying :) Given how often I accidentally commit the wrong text in vscode, I shudder to think of the damage I could do with this on my shell, hah! What safety measures are there/could there be?
biellls3 replies#
A simple approach might be that if the resulting exit code is not 0 it won't be used to complete in the future.
Eavolution#
That'd have the problem of tools like grep returning nothing, having an exit code of 1, but being a perfectly valid thing to suggest in the future.
starttoaster#
When you're writing, building, and executing code, I would not expect a 0 exit code every time.
KRAKRISMOTT#
The fish approach
owlstuffing2 replies#
Generally, a destructive shell command prompts for approval. But I suppose overfumbly fingers could still cause grief.

Type/command aware tooling is a night and day difference.

mksybr1 reply#
Generally? Do you have examples in mind? The ones I think of are destroy first and ask questions only if told to do so: mv cp rm redirection tee
owlstuffing#
Yeah, you’re right. I was thinking of overly destructive commands eg. reformat etc.
tombert2 replies#
I feel like I've trashed millions of files I shouldn't have with `rm` and trying to be clever with regular expressions.
doubled11221 replies#
I've done this enough times I use `ls` first, then `rm`

Continue this thread — 21 replies

teddyh5 replies#
Note: Normal shells use glob(7) expressions, not regular expressions.

Continue this thread — 5 replies

graypegg#
I don't know how painful it would be, but I think I could adapt to a short delay of maybe 50-100ms where the shell won't respond to Return presses, only after accepting a completion. Just long enough ideally to make me re-read what I entered.