oh-my-fish / plugin-cd

A featured cd can make your fish journey much more pleasant.
https://github.com/sancoder-q/plugin-cd
MIT License
19 stars 5 forks source link


cd

Plugin for Oh My Fish.

Package cd provides a new cd command to help you change the current working directory fast. It's a wrapper directive of the built-in cd command with many useful features and powerful completions.

Features:

Install

$ omf install cd

Usage

$ cd .../foo           # <=> cd ../../foo
$ cd ...               # <=> cd ../..
$ cd .../foo/.../bar   # <=> cd ../../foo/../../bar
$ cd                   # ~
$ cd ~/foo             # ~/foo
$ cd ~/bar             # ~/bar
$ cd -                 # ~/foo ;; ( Equal to `cd -1` )
$ pwd                  # ~/a
$ cd ~/b               # ~/b ;; ( dirstack: a )
$ cd ~/c               # ~/c ;; ( dirstack: b a )
$ cd ~/d               # ~/d ;; ( dirstack: c b a )
$ cd -2                # ~/b ;; ( dirstack: d c a )
$ cd +1                # ~/c ;; ( dirstack: b d a )
$ cd +0                # ~/a ;; ( dirstack: c b d )
$ cd -0                # ~/a ;; ( dirstack: c b d )

License

MIT © Jianming Qu