diff --git a/FAQ.md b/FAQ.md index 6e80590..e5a4feb 100644 --- a/FAQ.md +++ b/FAQ.md @@ -117,4 +117,18 @@ Use an editor that supports ANSI escape codes. For example: $ printf "\033[91mHello\033[0m world.\n" > motd.txt ``` -Will print "Hello" in red, then "world." in the default color. [More about escape codes here](http://wiki.bash-hackers.org/scripting/terminalcodes). \ No newline at end of file +Will print "Hello" in red, then "world." in the default color. [More about escape codes here](http://wiki.bash-hackers.org/scripting/terminalcodes). + +Shortcuts to insert an Esc code, for commonly used editors (from [LinuxQuestions](http://www.linuxquestions.org/questions/linux-from-scratch-13/add-some-color-and-other-stuff-to-your-lfs-login-4175412484/)): + +If using ```vi```: +```CTRL+v then Esc``` + +If using ```emacs```: +```CTRL+q then Esc``` + +If using ```nano```: +```Esc then v then Esc``` + +Using simply ```bash```: +```echo -e "\x1b"```