Mi blog lah! Το ιστολόγιό μου

22Jun/092

The bashrc bash configuration files

The default shell in most Linux distributions is the bash shell. Contrary to all the usability work that has been done to the GUI, the shell is most neglected area.

Current bashrc shell (shows prompt only)

Depicting a shell is not an easy task; in the screenshot above we only show the default prompt. It has the following disadvantages,

  1. It does not differentiate visually between the username and hostname.
  2. It shows the relative path only, making it difficult to realize quickly the full path for the current working directory.
  3. Cannot copy the path using the mouse by double-clicking on it. The ~ is not included in the highlighted text, that one needs to paste and add the remaining part of the path (such as /home/user/)
  4. The point of input changes position on the command line, depending on the size of the path. As you cd into directories, the point of input moves further to the right.

The bashrc project shell

This is the prompt with the bashrc project configuration files. It solves the problems described with the default configuration files found in Linux distributions.

Obviously, there are more to the shell’s configuration files than a usable prompt. For example,

  • the ability to show the partial matches when you press Tab for the first time
  • enabling the shopt options to reasonable values
  • have reasonable aliases for . .. … / -
  • adding –verbose, –interactive to basic utilities such as cp, mv, rm
  • show the exit value of an application if it is other than 0 ($?)

There is a EnhancedBash project for the Ubuntu Linux distribution which might be able to break apart and provide better default configuration files.

If you want to help and add more to the proposed configuration, visit http://github.com/simos/bashrc/

To use the bashrc shell, you need to

  1. Download the latest package from http://github.com/simos/bashrc/ (note the Download button).
  2. Extract the package, open a terminal window and enter the newly created directory.
  3. Run make install
  4. Open a new shell window. The new settings should be activated.

About Simos Xenitellis

No description. Please complete your profile.
Comments (2) Trackbacks (0)
  1. Will this works for mac?

    I tried on my OSX 10.5.6 but seems dosen’t work.

    This is the message followed by “sudo make systeminstall”

    sudo make systeminstall
    Password:
    -n Copying config files to /usr/share/bashrc…
    done.
    -n Copying bashrc_config to /usr/bin…
    done.

    You can now use bashrc_config
    as root to populate the /etc/skel directory
    so that each new user will have the config files,
    or
    as any user to have your own copy of the
    bashrc configuration files in your home directory.

    Q: Did you put the dot files in /etc/skel? A: No, use bashrc_config.

    —–

    Where I have done wrong?

    BTW: It works great on my Ubuntu box, I’m loving it.
    But your mail system treated my email address as spam. It seems doesn’t like emails contains the word “spam”, in which case a true spam won’t put spam in.

    Like or Dislike: Thumb up 0 Thumb down 0

  2. Thanks for the feedback.
    It appears that OS/X does not have the GNU ‘echo’ command which supports the command line option ‘-n’ (do not change line after echo-ing text).

    My blog uses a spam plugin that caught your post. I just released it.

    Like or Dislike: Thumb up 0 Thumb down 0


Leave a comment


No trackbacks yet.