Code Monkey home page Code Monkey logo

bash-full-of-colors's Introduction

Bash full of colors

Powerful .bashrc and .bash_profile coming together with colorful output. It adds additional information to your command prompt and many useful aliases.

Features:

  • shows number of active background jobs
  • shows number of open screen sockets
  • hostname color is based on host unique identifier to simplify server identification by the user when working with multiple open SSH sessions
  • shows checked-out branch name when current directory is within Git repository
  • shows last command return code if it differs from 0
  • shows Python virtualenv

Installation

The most convenient way of installation is to checkout the repository and symlink the relevant scripts. Assuming the installation in home directory:

git clone https://github.com/slomkowski/bash-full-of-colors.git .bash-full-of-colors
[ -f .bashrc ] && mv -v .bashrc bashrc.old
[ -f .bash_profile ] && mv -v .bash_profile bash_profile.old
[ -f .bash_aliases ] && mv -v .bash_aliases bash_aliases.old
[ -f .bash_logout ] && mv -v .bash_logout bash_logout.old
ln -s .bash-full-of-colors/bashrc.sh .bashrc
ln -s .bash-full-of-colors/bash_profile.sh .bash_profile
ln -s .bash-full-of-colors/bash_aliases.sh .bash_aliases
ln -s .bash-full-of-colors/bash_logout.sh .bash_logout

Application aliases

Many Unix commands have already newer and more feature-rich replacements. Following aliases are defined in bash_aliases.sh:

Command: Replacement:
df pydf
less most
tail multitail
top htop
tracepath mtr
traceroute mtr

To install them, run following command:

aptitude install most multitail pydf mtr htop

If you don't have them installed, script falls back to the original command.

You can also create your own local aliases. Create the file ~/.bash_local file and place them there.

Credits

2015 Michał Słomkowski. The code is published under the terms of Apache License 2.0.

bash-full-of-colors's People

Contributors

emreates avatar hchasens avatar slomkowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bash-full-of-colors's Issues

Summary at login

Can be generated by .bash_profile or loaded from /etc/motd.

  • system
  • uptime
  • last login
  • screen jobs
  • package update info (Ubuntu-like)

inxi makes good system summaries.

Possible LS issue

This happened the first time I ran LS

ls: illegal option -- -
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]

how to get a two-line PS1

I'd like to show PS1 prompt in one line, and put my command in second line, so that I can see all the infomation and do not have to type command into two lines, how could I get this feature?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.