fld#
Simple shell utility for creating cd aliases.
Instalation#
-
Clone and compile the repo
git clone https://tangled.org/vielle.dev/fld cd fld cargo build --release -
Copy binaries
cp ./target/release/fld /usr/bin/fld-bin chmod +x ./fld.sh cp ./fld.sh /usr/bin/fld -
Add to shell config
echo "source /usr/bin/fld" >> ~/.zshrc # or equivelent -
Reload shell and configure
fld add alias ~/ home fld add alias ~/dev dev fld add alias ~/dev/git dev git fld add editor code "code ." fld add editor c "code ."
Cli Reference#
fld go [path]:cdinto the folder aliased by the given path. Use-e <editor>or--editor <editor>with an editor to trigger the editorfld add alias <folder> [path]: Create an alias to the given folder at the given pathfld add editor <name> <cmd>: Create an alias name with an associated commandfld remove alias [path]: Remove the alias at the given pathfld remove editor <name>: Remove the editor with the given namefld list: List all aliases and editors
Config Reference#
{
// editor map of name > command
"editors": {
"c": "code .",
"code": "code .",
},
// alias map of root of path > node
// this example includes `git` > `~/dev/git` and `git tangled` to `~/dev/git/tangled`
"roots": {
"git": {
// required, path to navigate to
"path": "~/dev/git",
// required, alias map of path segment > node
"subnodes": {
"tangled": {
// does not need to be a subpath of parent
"path": "~/dev/git/tangled",
"subnodes": {},
},
},
},
},
}