Skip to content

Instantly share code, notes, and snippets.

@rikardbq
Created November 22, 2023 23:56
Show Gist options
  • Save rikardbq/f1a9828a97a897da4045155bb62f5d1b to your computer and use it in GitHub Desktop.
Save rikardbq/f1a9828a97a897da4045155bb62f5d1b to your computer and use it in GitHub Desktop.
WarpDir specifications

"Commander Sulu take us out. -Punching WarpDir captain!"

  • usage

    • wd :void (shows usage)
    • wd help | --help -h
    • wd save :alias [[--path? -p?] :string]
      • will store CWD or given path, with confirm if exists [ y/N ]
    • wd :alias/glob
      • will take you to the stored path for the given alias
    • wd update :alias [[--path? -p?] :string] [[--name? -p?] :string]
      • will update the given alias with given path or name
    • wd delete :alias
      • remove alias from config, with confirm [ y/N ]
    • wd list
      • lists all available aliases stored in .wd
    • wd zap
      • removes the whole list, with confirm [ y/N ]
    • wd config [[--convention? -c?] :string[strict|unix|permissive]]
  • install

    • bash
      • ./install.sh (pass arguments with flags, example --home-dir=whatever)
        • mkdir -p $HOME/.wd
        • echo "export WD_HOME = '$HOME/.wd'" >> $HOME/.bashrc
        • touch $WD_HOME/.wd
        • cp ./wd $WD_HOME/
        • chmod +x $WD_HOME/wd
        • not sure about below, google it later
          • ln -s $WD_HOME/cdd $HOME/.local/usr/share/bin/wd
  • conf

    • format
      • YAML?
      • TOML?
      • CUSTOM FORMAT?

LATER


  • pwsh
  • google some shit and read the docs for ps1 script cmdlets
  • ./install.ps1
    • New-Item -Path "$HOME/" -Name ".cdd" -ItemType Directory
    • echo "$env:CDD_HOME = "$HOME/.cdd" >> $PROFILE
    • New-Item -Path "$CDD_HOME/" -Name ".cdd-config" -Type File
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment