GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fezcode/bm: Bookmark Manager

BranchesTags
Open more actions menu

Latest commit

 

History

18 Commits
18 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bm.iml
bm.iml
 
 

Repository files navigation

BM - Bookmark Manager

A Simple Bookmark Manager for Your Shell.

Creates ~/.bm directory to store store.toml file which contains your bookmarks in toml format.

Commands

Command Description
bm a/add <name> Adds current directory to bookmarks.
bm a/add <name> <directory> [option] Adds given directory to bookmarks.
bm s/show Show all bookmarks.
bm s/show <name> Show bookmark associated with given name.
bm d/delete <name> Delete bookmark with given name.
bm h/help Prints help text.
bm -h/--help Prints help text.
bm v/version/-v/--version Prints version information.
bm debug <any full command> For any command, activates debug mode, if any debug prints are available.

Add Options

   -a, --add-anyway
       Adds path to bookmarks even if it does not exist
   
   -o, --overwrite
       Overwrites bookmark with new given value if a bookmark with
       same name exists.
       
   -d, --directory-only
       Add bookmark if it is directory only. If -f is provided last, -f will be used.
       
   -f, --file-only 
       Add bookmark if it is file only. If -d is provided last, -d will be used.

Show Options

   -p, --pretty
       When priting all files, via `bm show`, giving this option prints output
       in table format.

Examples

1. Add directory to bookmarks

# Add directory 
$ bm a HOME_DIR ~ 
# Add current directory
$ bm a HOME_DIR 

2. Change directory to HOME_DIR

Linux

$ cd `bm s HOME_DIR`
# or
$ cd $(bm s HOME_DIR)

Windows

$ cd $(.\bm s HOME_DIR)
# or
$ bm s HOME_DIR | cd

3. Show all bookmarks

$ bm s
# or pretty print
$ bm s -p

4. Delete bookmark

$ bm d HOME_DIR 

5. Add path to bookmarks if given path is path of a file

$ bm d FILE_PATH file.txt -f

6. Add path to bookmarks if given path is path of a directory

$ bm d DIR_PATH /path/to/dir -d

7. Print additional information via Debug command

$ bm debug add PATH /path

Building Project

In order to build project, run

$ cargo build

To run project,

$ cargo run --package bm --bin bm

Creating Debian Package

  1. First install cargo-deb package
   cargo install cargo-deb 
  1. Add metadata to Cargo.toml
[package.metadata.deb]
maintainer = "Username <[email protected]>"
copyright = "Copyright (c) 2022 Username <[email protected]>"
  1. Run cargo deb
cargo deb

Creating RPM Package

Install

cargo install cargo-generate-rpm

Usage

cargo build --release
strip -s target/release/XXX
cargo generate-rpm

Configuration

[package.metadata.generate-rpm]
    name: the package name. If not present, package.name is used.
    version: the package version. If not present, package.version is used.
    license: the package license. If not present, package.license is used.
    summary: the package summary/description. If not present, package.description is used.
    assets: (mandatory) the array of the files to be included in the package
        source: the location of that asset in the Rust project. (e.g. target/release/XXX) Wildcard character * is allowed.
        dest: the install-destination. (e.g. /usr/bin/XXX) If source contains wildcard character *, it must be a directory, not a file path.
        mode: the permissions as octal string. (e.g. 755 to indicate -rwxr-xr-x)
        config: set true if it is a configuration file.
        doc: set true if it is a document file.
    release: optional string of release.
    epoch: optional number of epoch.
    pre_install_script: optional string of pre_install_script.
    pre_uninstall_script: optional string of pre_uninstall_script.
    post_install_script: optional string of post_install_script.
    post_uninstall_script: optional string of post_uninstall_script.
    requires: optional list of Requires
    auto-req: optional string "no" to disable the automatic dependency process
    obsoletes: optional list of Obsoletes
    conflicts: optional list of Conflicts
    provides: optional list of Provides

Location

target/generate-rpm/XXX.rpm

Source

About

Bookmark Manager

Topics

bookmarkbookmark-managerbookmarkspretty-printrustshellterminalterminal-app

Resources

Readme
MIT license
Activity

Stars

13 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.