Features
- Profiles: Manage the bash shell environment for each machine
- Shortcuts: Create shortcuts for important filesystems paths
- Aliases: Aliases for your most important tools
To Install mybash on your computer
git clone git@github.com:hvasconcelos/mybash.git
cd mybash
ln -sf `$pwd`/.bashrc ~/.bashrc
ln -sf `$pwd`/.bash ~/.bash
cd mybash
ln -sf `$pwd`/.bashrc ~/.bashrc
ln -sf `$pwd`/.bash ~/.bash
Create a new mybash profile
> .bash/profiles/<profile_name>
chmod +ux .bash/profiles/<profile_name>
chmod +ux .bash/profiles/<profile_name>
Example:
vim .bash/profiles/macbookpro_home
export_dir_after /Users/hcv/Desktop/Android/sdk/tools
export_dir_after /Users/hcv/Desktop/Android/sdk/platform-tools
export_dir_after ~/bin
export_dir_before /usr/local/sbin
export_dir_before /usr/local/bin
addidir projs /Users/hcv/Desktop/beartouch/Projects
addidir blib /Users/hcv/Desktop/beartouch/Libraries
chmod +ux .bash/profiles/macbookpro_home
export_dir_after /Users/hcv/Desktop/Android/sdk/tools
export_dir_after /Users/hcv/Desktop/Android/sdk/platform-tools
export_dir_after ~/bin
export_dir_before /usr/local/sbin
export_dir_before /usr/local/bin
addidir projs /Users/hcv/Desktop/beartouch/Projects
addidir blib /Users/hcv/Desktop/beartouch/Libraries
chmod +ux .bash/profiles/macbookpro_home
Select the profile in vim .bashrc
set_profile <profile_name>
Example:
vim ~/.bashrc
set_profile macbookpro_home
set_profile macbookpro_home
Create a shorcut to a filesystem path
In a profile like “.bash/profiles/macbookpro_home” add something like
addidir <shortcutname> <path>
List your shortcuts
lidir
projs /Users/heldervasconcelos/Desktop/beartouch/Projects
blib /Users/heldervasconcelos/Desktop/beartouch/Libraries
…
projs /Users/heldervasconcelos/Desktop/beartouch/Projects
blib /Users/heldervasconcelos/Desktop/beartouch/Libraries
…
Goto to a filesystem path over a shorcut
goto <shortcutname>
Exemplo:
goto projs
pwd
/Users/heldervasconcelos/Desktop/beartouch/Projects
pwd
/Users/heldervasconcelos/Desktop/beartouch/Projects