I'd like to make commands I've typed (input) into terminal stand out from all the output.
For example:
imac:~ buster$ chmod -R g-w myfolder
imac:~ buster$ cd myfolder
imac:myfolder buster$ ls -l
total 0
drwxr-xr-x 9 root admin 306 Apr 20 2010 bin
drwxr-xr-x 7 root admin 238 Apr 20 2010 include
drwxr-xr-x 73 root admin 2482 May 18 17:16 lib
drwxr-xr-x 6 root admin 204 Apr 20 2010 man
imac:myfolder buster$ echo Go Giants!
Go Giants!
bold jumps to mind but I'd accept a color or even highlighting the whole line...
I'm sure there's a way to do this but it's not obvious to me...
thanks!
~/.bash_profile, but~/.bashrc(or both, if you don't source.bashrcfrom.bash_profile). These settings need to be set for each interactive instance of bash, and.bash_profileis read only by login shells. – Gilles 'SO- stop being evil' Oct 27 '10 at 18:16bashrc, so I used what was there. – Daniel Beck Oct 27 '10 at 18:20.bashrcvs.bash_profile, the document you cite is mostly correct. (The one mistake I spotted was that it gives an example withPATHbeing set in.bashrc, but that should be.bash_profile.) Basically the only sane configuration is for.bash_profileto source.bashrc, as in the example given. See also Difference between .bashrc and .bash_profile. – Gilles 'SO- stop being evil' Oct 27 '10 at 19:05~/.bashrc. – Dennis Williamson Oct 27 '10 at 19:27inputrcso I get the default up-arrow behavior. Sorry. – Daniel Beck Oct 27 '10 at 20:44trapis a bash buildin, so I'll refer you to the bash man page, just search fortrap [-lp] [arg] [sigspec ...]in there and you see what it does. Short version is: "If a sigspec is DEBUG, the command arg is executed after every simple command (see SHELL GRAMMAR above).". Means whenever a command was entered, we send theOFFformat string to the filename of the current TTY. – Daniel Beck Oct 28 '10 at 17:42