Skip to content
Midwire edited this page Jul 24, 2014 · 4 revisions

How can I see a list of commands that Bash.env understands?

bash.env help

How can I determine which plugins Bash.env is loading?

In your ~/.bashrc file set:

dot_env_verbose=1

Next time you start a shell it will display the plugins as they are loaded.

How do I create a plugin?

First create a directory for the new plugin:

mkdir -p ~/.env/plugins/plugin-name
cd ~/.env/plugins/plugin-name

Then create the source for your plugin:

# make sure the filename ends in '.plugin.sh'
vi plugin-name.plugin.sh

... save the file and add the plugin-name to your ~/.bashrc as follows:

plugins="plugin-name" # add additional plugins separated by a space

It may be beneficial to examine existing plugins in the ~/.env/plugins directory to get an idea of how to create your own.

How do I create my own theme?

Themes can be more useful than simply displaying pretty colors in your Bash prompt. They can display useful git repository information, shell version, date-time, current command history number, etc.

The easiest way to create a new theme is to copy an existing one:

cd ~/.env/themes
cp -r transwarp new_theme

Then edit the new_theme local.sh and test it by running:

try_theme new_theme

If you have properly set dot_env_home_host='your_hostname' in ~/.bashrc, the remote.sh version of the theme will be displayed when you login to a remote shell over SSH. The theme.sh script facilitates this.