nushell cdpath
cdpath for nushell
A cdpath implementation
After installation run config env and set $env.CDPATH like:
$env.CDPATH = [
".",
"~",
"~/path/to/repositories",
]
If you have the cdpath.nu repository checked out in ~/path/to/repositories/cdpath.nu you
can cd cdpath.nu from anywhere and go to that directory.
The above $env.CDPATH will complete:
- Entries under the current directory (
$env.PWD) - Entries in your home directory (
$env.HOME) - Entries where you check out repositories
- Children of those entries
This cdpath implementation also completes absolute and relative paths
Installation
If you have nupm configured:
nupm install https://forge.segment7.net/drbrain/cdpath.nu.git --git
Then after your use nupm/nupm add:
use cdpath cd
Otherwise clone cdpath.nu and source cdpath
Bugs
- This
cddoes not accept paths that start with "~". This should support directories ("~/.config/nu"), users ("~notme"), and both combined ("~notme/.config/nu")
History
Originally authored by skelly37, from nu_scripts cdpath.nu
Various contributions by myself and others
Split out to its own package by myself