| Crates.io | pathvar |
| lib.rs | pathvar |
| version | 0.0.1 |
| created_at | 2019-04-21 01:49:35.013688+00 |
| updated_at | 2019-04-21 01:49:35.013688+00 |
| description | Binary that facilitates idempotent modifications to your PATH. |
| homepage | |
| repository | https://github.com/bolinfest/pathvar-rs |
| max_upload_size | |
| id | 129172 |
| size | 7,453 |
An executable that facilitates idempotent modifications to your PATH variable.
Note that the idiomatic way to add folders to your PATH is to add lines like
the following to your ~/.bashrc:
PATH=~/bin:$PATH
PATH=$PATH:~/bin
This means that if you run source ~/.bashrc, ~/bin will be added to the
PATH again, which is not ideal. Note this also effectively happens
when you run tmux new window, so successive tmux windows have longer and
longer PATH variables under the standard idiom.
Run cargo install pathvar, which will add pathvar to your PATH.
This will prepend ~/bin (expanded) to the $PATH if it is not already present:
PATH=$(pathvar insert ~/bin)
This will append ~/bin (expanded) to the $PATH if it is not already present:
PATH=$(pathvar add ~/bin)