https://github.com/j6k4m8/bkm
Simple terminal-command bookmarking tool for quick cd'ing
https://github.com/j6k4m8/bkm
bash bkm bookmark ohp shell terminal zsh
Last synced: over 1 year ago
JSON representation
Simple terminal-command bookmarking tool for quick cd'ing
- Host: GitHub
- URL: https://github.com/j6k4m8/bkm
- Owner: j6k4m8
- License: apache-2.0
- Created: 2015-11-08T06:39:15.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T16:20:05.000Z (over 3 years ago)
- Last Synced: 2025-02-28T16:04:16.035Z (over 1 year ago)
- Topics: bash, bkm, bookmark, ohp, shell, terminal, zsh
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# bkm
Crazy-simple quick-bookmark terminal script for OSX and Linux. Bookmark the current directory with the `bkm my-folder` command. Navigate back to it by simply typing `my-folder`.
Note: There's nothing to stop you from saying `bkm ls` and borking your `ls` command. Don't do the dumb thing!
# Commands
| Command | Description | Example |
|---------|-------------|---------|
| **`bkm list`** | List all current bookmarks. | `bkm list` |
| **`bkm rm [nickname]`** or **`bkm remove [nickname]`** | Remove the bookmark for the given nickname. | `bkm rm projects` |
| **`bkm [nickname]`** | Nickname the current directory `nickname` | `bkm projects` |
| **`bkm [nickname] [directory]`** | Nickname the `directory` `nickname` | `bkm projects ~/Documents/Projects` |
# Setup
## Auto-Install
If you trust me (and literally it's like five lines of code so why not) simply run this from your terminal:
```
curl https://raw.githubusercontent.com/j6k4m8/bkm/master/bkm_setup.sh | sh
```
If you use zsh, you can use:
```
curl https://raw.githubusercontent.com/j6k4m8/bkm/master/bkm_setup_zsh.sh | sh
```
## Manual Install
Add the following line to your `~/.bashrc` or `~/.zshrc` or whatever:
```
source ~/.bkm
```
I put the `bkm` executable in my `~` directory and renamed it `._bkm`.
Then I can reference it from anywhere by adding this line to my rc-file:
```
alias bkm="~/._bkm"
```
# Usage
Navigate to a directory, and then simply type `bkm [nickname]`, where `nickname` is the name you want to use to get to this directory from anywhere. For instance,
```
cd ~/Documents/CuteGoldfishPictures/Favorites
bkm gfish
```
**Re-source your rc (`source ~/.bashrc`)** and then you can type `gfish` from any directory to immediately navigate back to that directory.