11# BM - Bookmark Manager
2- ## Your Shell Bookmark Manager.
2+ ## A Simple Bookmark Manager for Your Shell .
33
44Creates ` ~/.bm ` directory to store ` store.toml ` file which contains your bookmarks in
55` toml ` format.
66
77## Commands
8-
9- ``` bash
10- bm a/add < name> : Adds current directory to bookmarks.
11- bm a/add < name> < directory> [option] : Adds given directory to bookmarks.
12- bm s/show : Show all bookmarks.
13- bm s/show < name> : Show bookmark associated with given name.
14- bm d/delete < name> : Delete bookmark with given name.
15- bm h/help : Prints help text.
16- bm -h/--help : Prints help text.
17- bm debug < any full command> : For any command, activates debug mode, if any debug prints are available.
18- ` ` `
8+ | Command | Description |
9+ | :---------------------------------------| :--------------------------------------------------------------------------|
10+ | ` bm a/add <name> ` | Adds current directory to bookmarks. |
11+ | ` bm a/add <name> <directory> [option] ` | Adds given directory to bookmarks. |
12+ | ` bm s/show ` | Show all bookmarks. |
13+ | ` bm s/show <name> ` | Show bookmark associated with given name. |
14+ | ` bm d/delete <name> ` | Delete bookmark with given name. |
15+ | ` bm h/help ` | Prints help text. |
16+ | ` bm -h/--help ` | Prints help text. |
17+ | ` bm debug <any full command> ` | For any command, activates debug mode, if any debug prints are available. |
1918
2019### Add Options
2120```
@@ -31,48 +30,96 @@ bm debug <any full command> : For any command, activates debug mode, if
3130
3231 -f, --file-only
3332 Add bookmark if it is file only. If -d is provided last, -d will be used.
34-
3533```
3634
3735### Show Options
38-
3936```
4037 -p, --pretty
4138 When priting all files, via `bm show`, giving this option prints output
4239 in table format.
4340```
4441
45- # # Building Project
42+ ## Examples
43+
44+ ### 1. Add directory to bookmarks
45+ ``` bash
46+ # Add directory
47+ $ bm a HOME_DIR ~
48+ # Add current directory
49+ $ bm a HOME_DIR
50+ ```
51+
52+ ### 2. Change directory to ` HOME_DIR `
53+ ** Linux**
54+ ``` bash
55+ $ cd ` bm s HOME_DIR`
56+ # or
57+ $ cd $( bm s HOME_DIR)
58+ ```
59+
60+ ** Windows**
61+ ``` bash
62+ $ cd $( .\b m s HOME_DIR)
63+ # or
64+ $ bm s HOME_DIR | cd
65+ ```
66+
67+ ### 3. Show all bookmarks
68+ ``` bash
69+ $ bm s
70+ # or pretty print
71+ $ bm s -p
72+ ```
4673
74+ ### 4. Delete bookmark
75+ ``` bash
76+ $ bm d HOME_DIR
77+ ```
78+
79+ ### 5. Add path to bookmarks if given path is path of a file
80+ ``` bash
81+ $ bm d FILE_PATH file.txt -f
82+ ```
83+
84+ ### 6. Add path to bookmarks if given path is path of a directory
85+ ``` bash
86+ $ bm d DIR_PATH /path/to/dir -d
87+ ```
88+
89+ ### 7. Print additional information via Debug command
90+ ``` bash
91+ $ bm debug add PATH /path
92+ ```
93+
94+ ## Building Project
4795In order to build project, run
4896
4997``` bash
50- cargo build
98+ $ cargo build
5199```
52100
53101To run project,
54102
55103``` bash
56- cargo run --package bm --bin bm
104+ $ cargo run --package bm --bin bm
57105```
58106
59107## Creating Debian Package
60- [Source](https://blog.karmacomputing.co.uk/how-to-create-deb-package-from-rust/)
61- 1. First install cargo-deb package
108+ 1 . First install cargo-deb package
62109``` bash
63110 cargo install cargo-deb
64111```
65112
661132 . Add metadata to Cargo.toml
67114``` toml
68-
69115[package .metadata .deb ]
70- maintainer = " Fezcode <samil.bulbul@gmail.com>"
71- copyright = " Copyright (c) 2022 fezcode <samil.bulbul@gmail.com>"
72-
116+ maintainer = " Username <username@example.com>"
117+ copyright = " Copyright (c) 2022 Username <username@example.com>"
73118```
74119
751203 . Run ` cargo deb `
76121```
77122cargo deb
78- ` ` `
123+ ```
124+
125+ ** _ [ Source] ( https://blog.karmacomputing.co.uk/how-to-create-deb-package-from-rust/ ) _ **
0 commit comments