This repository has been archived on 2025-01-31 . You can view files and clone it, but cannot push or open issues or pull requests.
proj
Usage
Invoke the script and pass the name of the project as its only non-flag argument:
proj learncpp
If the project exists in your project directory, it will spawn a subshell in that directory. Advanced usage and hooks are detailed below, but you can use it as a glorified cd
if that's all you need.
Flags
flag | description | args |
---|---|---|
-c | Path to a config file to load in place of the default (~/.config/proj.conf ) |
Path to config file |
-h | Print basic help text |
Configuration
value | description | default |
---|---|---|
git_auto_init | If not set to 0 , automatically initialize a git repository on project creation |
0 |
git_auto_init_always | If not set to 0 , automatically initialize a git repository any time you enter a project and ./.git does not exist |
0 |
git_auto_init_gitignore | A colon-separated ($PATH-style) list of items to include in the initial .gitignore |
*.swp |
hook_pre_create | Path to a script invoked (not sourced) before a project is created. Script will be executed relative to project_dir |
Empty string |
hook_pre_spawn | Path to a script invoked (not sourced) before a shell is spawned in the project directory. Script will be executed relative to the project's root directory | Empty string |
project_dir | Path to where projects should be stored. | $HOME/Projects |
Description
Languages
Shell
100%