Giter Club home page Giter Club logo

bookmarks's Introduction

zshmarks

A port of Bashmarks (by Todd Werth), a simple command line bookmarking plugin, for oh-my-zsh

Commands/Usage:

  • c - used to cd to the given bookmark directory.
c foo
  • mark - used to create a new bookmark for your current working directory
cd 'some_dir'
mark foo
# Or
mark # Will be added as `some_dir`
  • delmark - used to delete a bookmark
delmark foo
# Or
delmark foo bar baz # Remove multiple bookmarks
# Or
delmark # Will delete current dir from bookmarks
  • marks - prints a list of all saved bookmarks, or print the directory information for a single, specific bookmark
marks # Show all marks
# Or 
marks foo # Show path to bookmark

Notes/Tips:

You can change the location of the bookmarks file (default is $HOME/.bookmarks) by adding the environment variable 'BOOKMARKS_FILE' to your shell profile.

export BOOKMARKS_FILE="foo/bar"

If you were expecting this to be a port of similarly named Bashmarks (by huyng), you can setup zshmarks to behave in roughly the same way by adding the following aliases to your shell setup files/dotfiles:

alias g="c"
alias s="mark"
alias d="delmark"
alias p="marks"
alias l="marks"

(You can also omit the "l" alias, and just use p without an argument to show all bookmarks.)

How to install

  • Download the script or clone this repository in oh-my-zsh plugins directory:
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zpm-zsh/zshmarks.git
  • Activate the plugin in ~/.zshrc:
plugins=( [plugins...] zshmarks [plugins...])
  • Restart shell

Add the following to your .zshrc file somewhere after you source zpm.

zpm load "zpm-zsh/zshmarks"

Add antigen bundle zpm-zsh/zshmarks to your .zshrc where you're adding your other plugins. Antigen will clone the plugin for you and add it to your antigen setup the next time you start a new shell.

For most people the easiest way to use zshmarks with prezto is to manually clone the zshmarks repo to a directory of your choice (e.g. /usr/local or ~/bin) and symlink the zshmarks folder into your zpretzo/modules folder:

ln -s ~/bin/zshmarks ~/.zprezto/modules/zshmarks

Alternatively, you can add the zshmarks repository as a submodule to your prezto repo by manually editing the '.gitmodules' file:

[submodule "modules/zshmarks"]
        path = modules/zshmarks
        url = https://github.com/zpm-zsh/zshmarks.git

Then make sure you activate the plugin in your .zpreztorc file:

zstyle ':prezto:load' pmodule \
zshmarks \
...

Add the following to your .zshrc file somewhere after you source zplug.

zplug "zpm-zsh/zshmarks"

bookmarks's People

Contributors

anujdeshpande avatar brennebeck avatar eriknomitch avatar forivall avatar ftclausen avatar grigorii-horos avatar hasit avatar jocelynmallon avatar tmayad avatar unixorn 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.