5 ms·
Color Bash Prompts
- aliem 15y agoArchLinux wiki became, along with gentoo's handbook, one of the few places to get good information about many recurring questions about gnu/linux configuration.
- yabai 15y agoYes. I used to use the Gentoo wiki...these days, it seems like all the action is on the Arch wiki. Arch is a great distro!
- RexRollman 15y agoI agree. I also like the FAQ of OpenBSD (and their manpages are good too).
- zerovox 15y agoThis could be the first time I've approved of style="text-decoration: blink;" being used.
- gbaygon 15y agoIndeed. But after reading your comment i had to open Firefox to see that, it doesn't blink in Chrome. It seems that "The 'blink' value is not supported in IE, Chrome, or Safari." according to w3schools.
- sravfeyn 15y agoI have a question that suits the context. How can I get syntax highlighting on Bash while in interactive mode of interpreted languages like Python. Also applies to Standard-ML prompt.
- deefour 15y agoThere's a couple gems that help with this in ruby. Coolline[1] colors syntax in the readline as you type. There's a gem[2] that integrates this with Pry[3] (an alternative to irb). For colored output in Pry's REPL, awesome_print[4] can be integrated[5] using pry's .pryrc files. [1]https://github.com/Mon-Ouie/coolline [2]https://github.com/pry/pry-coolline [3]https://github.com/pry/pry [4]https://github.com/michaeldv/awesome_print [5]https://gist.github.com/004b0cdfccf0e29d83e3
- tomku 15y agoBash doesn't actually handle the syntax highlighting in those cases, it's all done by the interpreter itself. You'll need to either modify your interpreter through a plugin or replace it. For Python, check out bpython [1]. If you don't mind using a graphical program for your interactive REPL, check out DreamPie [2] or the newish GUI version of ipython [3], which is a bit of a bear to install, unfortunately. I don't think the command-line version of ipython supports syntax highlighting, but I'd love to be wrong about that. I'm not really qualified to talk about Standard ML as my experience with it have been primarily in Emacs rather than the REPL. [1] http://bpython-interpreter.org/ http://bpython-interpreter.org/ [2] http://dreampie.sourceforge.net/ http://dreampie.sourceforge.net/ [3] http://ipython.org/ http://ipython.org/
- sravfeyn 15y agoThank You.
- daxelrod 15y agoThis leads to a wonderful idea: is it possible to make Bash syntax-highlight the Bash code you type at the prompt? I'm guessing the answer is currently "no".