←back to thread

217 points tanelpoder | 1 comments | | HN request time: 0.207s | source
Show context
fouric ◴[] No.26492914[source]
If you could configure the common shells (bash, zsh, fish) to run a custom command on submitted shell input before executing, you could build a heuristic function that would attempt to recognize when you were pasting in a prompt. Unfortunately, I'm not aware of such a capability, as it would be useful in a number of situations.

Another alternative is to put the octothorpe # at the beginning of your prompt - then you can keep your > at the end.

replies(2): >>26493527 #>>26494355 #
1. vlovich123 ◴[] No.26493527[source]
I recall terminals (MacOS Terminal? definitely Konsole seems to) that prevent any paste from actually executing the command, even if it contains newlines. Doesn't that solve this problem?