Simple cd shortcut program.
0

Configure Feed

Select the types of activity you want to include in your feed.

Rust 99.0%
Shell 1.0%
5 1 0

Clone this repository

https://git.vm.fail/vielle.dev/fld https://git.vm.fail/did:plc:bwvy4i47to2c2aokzskvdbqt
ssh://git@knot.vielle.dev:2222/vielle.dev/fld ssh://git@knot.vielle.dev:2222/did:plc:bwvy4i47to2c2aokzskvdbqt

For self-hosted knots, clone URLs may differ based on your setup.


README.md

fld#

Simple shell utility for creating cd aliases.

Instalation#

  1. Clone and compile the repo

    git clone https://tangled.org/vielle.dev/fld
    cd fld
    cargo build --release
    
  2. Copy binaries

    cp ./target/release/fld /usr/bin/fld-bin
    chmod +x ./fld.sh
    cp ./fld.sh /usr/bin/fld
    
  3. Add to shell config

    echo "source /usr/bin/fld" >> ~/.zshrc # or equivelent
    
  4. 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]: cd into the folder aliased by the given path. Use -e <editor> or --editor <editor> with an editor to trigger the editor
  • fld add alias <folder> [path]: Create an alias to the given folder at the given path
  • fld add editor <name> <cmd>: Create an alias name with an associated command
  • fld remove alias [path]: Remove the alias at the given path
  • fld remove editor <name>: Remove the editor with the given name
  • fld 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": {},
        },
      },
    },
  },
}