GithubHelp home page GithubHelp logo

indrajithbandara / commacd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from skorochkin/commacd

0.0 1.0 0.0 119 KB

When `cd` is just too slow.

Home Page: http://shyiko.com/2014/10/10/commacd/

Shell 95.92% Makefile 4.08%

commacd's Introduction

commacd Build Status

A faster way to move around (Bash 3+).

While going through "Usage" section please keep in mind that commacd is NOT an autojump/z/fasd alternative nor they are mutualy exclusive. It doesn't track history, write any logs, nothing like that. It really is just an improved cd.

Installation

curl https://raw.githubusercontent.com/shyiko/commacd/master/commacd.bash -o ~/.commacd.bash && \
  echo "source ~/.commacd.bash" >> ~/.bashrc

On OS X you'll need to make sure ~/.bashrc is sourced from ~/.bash_profile (http://ss64.com/osx/syntax-bashrc.html).

Usage

commacd introduces three aliases: , (for jumping forward), ,, (backward) and ,,, (backward+forward):

~$ , des
  => cd Desktop

# move through multiple directories
~$ , /u/l/ce
  => cd /usr/local/Cellar

# allow me to choose directory in case of ambiguous pattern (= multiple choices)
~$ , d
  => 1 Desktop
     2 Downloads
     : <type index of the directory to cd into>

# given two directories jdk7 and jdk8 on the Desktop, cd into jdk8 without hitting 
# interactive mode (the one shown above)
~/github$ , ~/d/j*8
  => cd ~/Desktop/jdk8

# cd into directory having 'esk' somewhere in its name
~/github$ , ~/*esk
  => cd ~/Desktop

# go all the way up to the project root (in this case, the one that has .git in it)
~/github/lorem/src/public$ ,,
  => cd ~/github/lorem

# cd into to the first (closest) parent directory named g*
~/github/vimium/src/public$ ,, g
  => cd ~/github

# substitute jekyll with ghost
~/github/jekyll/test$ ,, jekyll ghost
  => cd ~/github/ghost/test

# jump to some other project (in this case, located in ~/github)
~/github/rook/src/public$ ,,, m*binlog
  => cd ~/github/mysql-binlog-connector-java

As a bonus, all three aliases support <Tab> expansion (try , /u/lo<Tab>) and can be combined with other tools (e.g. ls `, /u/lo` ).

For more information, please refer to http://shyiko.com/2014/10/10/commacd/.

Development

make # lint sources and run tests 

License

MIT License

commacd's People

Contributors

shyiko avatar

Watchers

 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.