v l c whatchamacallit

Tim Chase blinux.list at thechases.com
Wed Dec 10 19:53:03 UTC 2014

On December 10, 2014, Paul Merrell wrote:
> Search your file system for a file named .bashrc (note the leading
> period). Usually this will be in your /home/username directory.  Add
> your aliases to this file.

You don't even have to search for it as Bash only looks in ~/.bashrc
(well, and /etc/bash.bashrc but that's system-wide and maintained by
your distro usually) so you can just edit that one file:

  vi ~/.bashrc

or use your editor-of-choice if it's not "vi".  And, if your
editor-of-choice happens to not be vi, you can export it as your
default editor in the same file.  So to set it to nano, you could add
these three lines to your ~/.bashrc

  set EDITOR=`which nano`

You can just change "nano" to "emacs", "ed", "edbrowse", "joe", or
whatever else you like.  Those three lines will make many other
programs use your preferred editor as well (things like editing
commit-messages in git/mercurial/subversion, editing the command-line
with "fc" or control+x followed by control+e in bash, etc).  Well
worth it if vi/vim isn't your preferred editor.

-tim (for whom vi/vim *is* my preferred editor, but I'm all about
helping folks get stuff done)

More information about the Blinux-list mailing list