Code Monkey home page Code Monkey logo

mark-directory's Introduction

INTRO

Provides a quick way to change directory from the command line.

It's an improved version to which originally written by @jeroen janssens.

The improved points:

  • Provides a simple install or uninstall script;
  • Supports both GNU Linux and MAC OSX;
  • More smarter commands;
  • See #Usage for more information...

It's so small that everyone can understand it and then customize for yourself.

Usage

First install from github:

$ git clone https://github.com/dangoakachan/mark-directory
$ cd mark-directory
$ sh install_markrc.sh
$ source ~/.markrc

Then play it with following commands:

$ g /your/favorite/direcotry     # uh... just jump to the directory directly
$ s a-name-you-like              # save a mark with name 'a-name-you-like'
$ g                              # like `cd`, jump to your home
$ g -                            # like `cd -`, jump to last visited directory
$ g a-name-you-like              # jump to the marked directory based on the name  
$ g a-name                       # the same as above, the mark name will be expanded
$ p                              # list all predefined marks
$ d a-name-you-like              # delete the mark

You can use tab to complete the arguments if possible.

Commands

Jump command

Syntax: jump [markname|directory]

Shortcuts: j, g

Description: jump to the directory based on the argument, which can be mark name or directory.

The later behavior like cd built-in command.

Mark command

Syntax: mark [markname]

Shortcuts: m, s

Description: create a mark for current directory.

Use current directory basename as mark name if the argument is not provided.

Unmark command

Syntax: unmark [markname]

Shortcuts: u, d

Description: delete the mark created before.

If you missing the mark name, this command will delete the mark name points to current directory.

List command

Syntax: marks

Shortcuts: l, p

Description: list all mark names.

Feedback

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.