@@ -12,10 +12,44 @@ It's useful if you use multiple shells regularly and would like a single source |
| 12 | 12 | - Manage persistent aliases, env vars, shell functions |
| 13 | 13 | - Define toggleable groups of aliases, e.g. `dev`, `personal` |
| 14 | 14 | |
| 15 | | -If you decide you want to use this yourself, do all the usual cloning, then from your local run `make install`. |
| 15 | +### Shell Integration |
| 16 | +Shtick generates shell-specific files in `~/.config/shtick/`. To make them available in new shell sessions, add this to your shell config: |
| 16 | 17 | |
| 18 | +``` |
| 19 | +# ~/.bashrc or ~/.zshrc |
| 20 | +source ~/.config/shtick/load_active.bash |
| 21 | + |
| 22 | +# ~/.config/fish/config.fish or whatever shell you use |
| 23 | +source ~/.config/shtick/load_active.fish |
| 24 | +``` |
| 25 | + |
| 26 | +### Supported Shells |
| 27 | +`bash`, `zsh`, `fish`, `ksh`, `mksh`, `yash`, `dash`, `csh`, `tcsh`, `xonsh`, `elvish`, `nushell`, `powershell`, `rc`, `es`, `oil` |
| 28 | +- Run `shtick shells` to see the complete list. |
| 29 | + |
| 30 | +If you decide you want to use this yourself, do all the usual cloning, then from your local run `make install` and the `shtick` package will be installed in your environment. |
| 31 | + |
| 32 | +### Commands reference |
| 33 | +``` |
| 34 | +shtick alias <key>=<value> # Add persistent alias |
| 35 | +shtick env <key>=<value> # Add persistent env var |
| 36 | +shtick function <key>=<value> # Add persistent function |
| 17 | 37 | |
| 18 | | -`usage: shtick [-h] [--debug] {generate,add,add-persistent,alias,env,function,remove,remove-persistent,activate,deactivate,status,list,shells,source} ...` |
| 38 | +shtick add <type> <group> <key>=<value> # Add to specific group |
| 39 | +shtick remove <type> <group> <key> # Remove from group |
| 40 | + |
| 41 | +shtick activate <group> # Activate group |
| 42 | +shtick deactivate <group> # Deactivate group |
| 43 | + |
| 44 | +shtick status # Show status |
| 45 | +shtick list [-l] # List items |
| 46 | +shtick generate # Regenerate shell files |
| 47 | +shtick source [--shell <shell>] # Output source command |
| 48 | + |
| 49 | +shtick shells [-l] # List supported shells |
| 50 | +``` |
| 51 | + |
| 52 | +`` |
| 19 | 53 | |
| 20 | 54 | Usage examples: |
| 21 | 55 | ``` |
@@ -99,6 +133,7 @@ TOM = "JERRY" |
| 99 | 133 | note = "echo \"$(date): $*\" >> $HOME/notes.txt" |
| 100 | 134 | ``` |
| 101 | 135 | |
| 136 | + |
| 102 | 137 | ## Python API Usage |
| 103 | 138 | We also expose a public API for using shtick functionality as library functions. |
| 104 | 139 | |