5 ms·
Seeing '>' as an option makes it somewhat relevant to mention here: I'd recommend not ending your prompt with a '>' character (as you'd see in DOS/Windows a lot
by drivers99 5y ago
Seeing '>' as an option makes it somewhat relevant to mention here: I'd recommend not ending your prompt with a '>' character (as you'd see in DOS/Windows a lot, which might make it seem like a nice option). If you accidentally copy and paste your prompt with a command after it, (which is easy to do with a couple mouse clicks, or if you forget what's in your clipboard after copying some lines from your terminal,) the first thing after the > sign is the file for a script or executable and you will truncate the file (make it 0 bytes). This can be especially bad if you're root at the time. (That makes # as a root prompt especially a good idea.)
- deleted 5y ago[deleted]
- tyingq 5y agoMaybe >(Unicode 0xFF1/>) would be a good substitute? Side by side: >>
- TremendousJudge 5y agothat seems like asking for trouble
- wodenokoto 5y agoJapanese has a few brackets that might be useful but less easy to confuse. Here’s a few the IME on my phone suggested (the middle ones are the same as yours as far as I can tell): 〉> > ≫ 》
- chrissnell 5y agoTerminal app feature idea: a hotkey that puts the last command run in the copy buffer
- dllthomas 5y agofunction copy_last_command { history 1 | sed 's/ [0-9]* //' | xclip -i } bind -x '"\C-h":copy_last_command'
- bobbyi_settv 5y agoThe Mac equivalent of xclip -i is pbcopy
- RobRivera 5y agoI would have never thought of that. ty for the tip
- drivers99 5y agoLearned about that when a co-worker did that about 20 years ago.
- codemac 5y ago; is also a great prompt, without directory machine name or anything. I just copy paste my session, and rerun most commands.