Code Monkey home page Code Monkey logo

wd's Introduction

wd

wd (warp directory) lets you jump to custom directories in zsh, without using cd. Why? Because cd seems ineffecient when the folder is frequently visited or has a long path.

Setup

oh-my-zsh

wd comes bundles with oh-my-zshell!

Just add the plugin in your ~/.zshrc file:

plugins=(... wd)

Automatic

Run either in terminal:

  • curl -L https://github.com/mfaerevaag/wd/raw/master/install.sh | sh

  • wget --no-check-certificate https://github.com/mfaerevaag/wd/raw/master/install.sh -O - | sh

Manual

  • Clone this repo to your liking

  • Add wd function to .zshrc (or .profile etc.):

     wd() {
         . ~/paht/to/wd/wd.sh
     }
    

Completion

If you're NOT using oh-my-zsh and you want to utelize the zsh-completion feature, you will also need to add the path to your wd installation (~/bin/wd if you used the automatic installer) to your fpath. E.g. in your ~/.zshrc:

fpath=(~/path/to/wd $fpath)

Also, you may have to force a rebuild of zcompdump by running:

$ rm -f ~/.zcompdump; compinit

Usage

  • Add warp point to current working directory:

     $ wd add foo
    

    If a warp point with the same name exists, use add! to overwrite it.

    Note, a warp point cannot contain colons, or only consist of only spaces and dots. The first will conflict in how wd stores the warp points, and the second will conflict other features, as below.

  • From an other directory (not necessarily), warp to foo with:

     $ wd foo
    
  • You can warp back to previous directory, and so on, with this dot syntax:

     $ wd ..
     $ wd ...
    

    This is a wrapper for the zsh dirs function. (You might need setopt AUTO_PUSHD in your .zshrc if you hare not using oh-my-zshell).

  • Remove warp point test point:

     $ wd rm foo
    
  • List all warp points (stored in ~/.warprc):

     $ wd ls
    
  • List warp points to current directory

     $ wd show
    
  • Print usage with no opts or the help argument.

License

The project is licensed under the MIT-license.

Finally

If you have issues, feedback or improvements, don't hesitate to report it or submit a pull-request.

Credit to altschuler for awesome idea.

Hope you enjoy!

wd's People

Contributors

hamiltont avatar malthejorgensen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.