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
|
2023-10-12 18:53:36 +09:00
|
|
|
your filesystems. This plugin is derived from the project
|
2024-01-15 16:31:34 +10:00
|
|
|
https://github.com/huyng/bashmarks but contains improvements. This plugin is
|
2023-10-12 18:53:36 +09:00
|
|
|
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
|
|
|
|
2019-07-26 00:24:54 -07: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
|
|
|
|
```
|
2019-07-26 00:24:54 -07:00
|
|
|
|
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
|
|
|
|
|
2023-10-14 17:06:06 +09:00
|
|
|
- **`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.
|