 

Drupal・1 min read・Last update on April 16, 2020

# Bookmark folders

 

 

 

 ![Bookmark folders](/sites/default/files/remediation-media/64e5ddecd8b51449bff05add_blog-featured-image.webp) 

 



 

   Table of contents  - [Sample Use Case](#sample-use-case)
- [List of Commands](#list-of-commands)
- [Installation without brew](#installation-without-brew)
- [Installation with brew](#installation-with-brew)
 
  

 

Tired of navigating to folders via their meandering paths.....Start using aliases, but finding them hard to manage. Enter bookmark.

This is a very handy functionality that lets us bookmark folders, and easily navigate to them in the future, rather than manually creating aliases for navigating into each folder.

### Sample Use Case

 ```

cd /webapps/app1 bookmark firstapp

```

then next time you could directly do

 ```

go app1

```

rather than having to cd into the folder manually.

### List of Commands

Bookmark a folder. If no arguments are passed, it will create a bookmark with that current folder's name.

 ```

cd /webapps/app2 bookmark [name]

```

The file where bookmarks are saved (.bookmarks) will look like this /webapps/app1|firstapp /webapps/app2|app2 Unbookmark functionality has been added as well. Will unbookmark current folder if no name is specified.

 ```

unbookmark [name]

```

Error message on unbookmarking a folder that doesn't exist. If you were inside a specific folder which has been bookmarked, it would be removed from list of bookmarks. Show Bookmarks to see list of bookmarks

 ```

bookmarksshow

```

Go - Command to navigate to a folder. Supports completion as well.

 ```

go app2

```

P.S. - Been using this functionality for a long time, can't remember its original author. Code's been heavily modified with a lot of functionalities added by me now. Credit to him/her as well :-)

### Installation without brew

Clone (or manually download) the project:

 ```

git clone https://github.com/pratik60/bookmark.git ~/bookmark`

```

2\. Add the following line to your `~/.bash\_profile` or `~/.zshrc` file:

 ```

&&. ~/bookmark/bookmarker.sh

```

### Installation with brew

 ```

brew tap pratik60/bookmark brew install bookmark

```

 



Written by

Pratik Bothra

 

 

 

 

 

 

 ## We'd love to talk about your business objectives

 [ Contact Us  ](/contact)