lope across your projects' directories
I bet you have a bunch of paths in your system where you cd often. Just lope.
# instead of
cd ~/MyProjects/organization/important_project/DatabaseDumps
# just use
lope dump
# or even
lope dYou can define aliases for paths in your system and use them in human readable shorter commands without need for autocompletion and visual noise.
lope microservice1 && rm something && make export && lope microservice2 && make import && watch lslope is a small bash script and configuration file. No database. No complex path parsing or shell integration. No statistics collection. You lope only around the paths you've added in configuration file.
lope only compares alias prefixes. myproject will be matched by my but not project.
make lope available somewhere in your $PATH. /usr/bin I guess? ~/.lopefile should be your configuration file. Alternatively, you can add an alias somewhere in your .bashrc
alias lope='LOPE_FILE=/path/to/lopefile/.lopefile lope'.lopefile is just a bash script, you can define variables and call programms or functions. That's dangerous, see security.
lope defines following function for you:
sets default path to lope when you call lope without any arguments
sets an aliases for path. You can pass zero or multiple aliases
lope_alias /home/user/Projects/MySuperProject mysuperproject msp superthis will set aliases mysuperproject, msp and super as an aliases for the path. MySupeProject will also be added as an alias, no need to duplicate directory name itself. Any prefix matches the alias. m or my is enough to match mysuperproject.
makes lope set aliases for all subdirectories in path
lope_dir /home/user/Projectsso, your typical .lopefile will be something like
local PROJ=/home/user/Projects
# by default jump in projects dir
lope_default $PROJ
# add all projects as aliases
lope_dir $PROJ
# also add some special subprojects
lope_dir $PROJ/some_special_group_of_projects
# add some alternative aliases for particular projects
lope_alias $PROJ/MySuperProject msp
lope_alias $PROJ/some_special_group_of_projects specialbash doesn't guarantees and order of hash dictionaries, so lope may unobviously process aliases with common prefixes. If you have project1 and project2 lope p will guide you to some of them %)
lope and .lopefile are bash scripts. Consider protecting it against unwanted writing. Any shell code put in may be executed.