Files
oh-my-bash/plugins/bashmarks/README.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2018-05-08 14:42:45 +02:00
# Bashmarks plugin
2023-10-12 18:55:15 +09:00
The Bashmarks plugin allows you to create and use bookmarks for directories on
your filesystems. This plugin is derived from the project
https://github.com/huyng/bashmarks but contains improvements. This plugin is
licensed under the 3-Clause BSD license.
2018-05-08 14:42:45 +02:00
## Quickstart
Create a new bookmark using the *bm -a* command:
2023-10-12 18:55:15 +09:00
```bash
$ bm -a mydir
```
2018-05-08 14:42:45 +02:00
2023-10-12 18:55:15 +09:00
The command above creates a bookmark for the current directory with the name
*mydir*.
2018-05-08 14:42:45 +02:00
You can navigate to the location of a bookmark using the *bm -g* command:
2023-10-12 18:55:15 +09:00
```bash
$ bm -g mydir
```
2018-05-08 14:42:45 +02:00
You can also supply just any bookmark name and the *-g* option will be assumed:
2023-10-12 18:55:15 +09:00
```bash
$ bm mydir
```
2023-10-12 18:55:15 +09:00
Tab completion is available when you need to enter a bookmark name in a
command, such as when using *bm -g*
2018-05-08 14:42:45 +02:00
2023-10-12 18:55:15 +09:00
Easily list all bookmarks you have set up using the *bm -l* command:
```bash
$ bm -l
```
## Configuration
- **`BASHMARKS_SDIR`**: This variable contains the path to the file that stores
the information of bookmarks of directory names. The default path is
`~/.sdirs`. The old interface `SDIRS` is now deprecated.
2018-05-08 14:42:45 +02:00
## Commands
- **`bm -h`**: Print short help text
- **`bm -a bookmarkname`**: Save the current directory as bookmarkname
- **`bm [-g] bookmarkname`**: Go to the specified bookmark
- **`bm -p bookmarkname`**: Print the bookmark
- **`bm -d bookmarkname`**: Delete a bookmark
- **`bm -l`**: List all bookmarks
2018-05-08 14:42:45 +02:00
## Valid bookmark names
2023-10-12 18:55:15 +09:00
A bookmark name can contain lower and upper case characters (A-Z), numbers and
underscore characters. No periods, semicolons, spaces or other characters are
allowed in a bookmark name.