mn

Crates.iomn
lib.rsmn
version0.2.1
sourcesrc
created_at2019-01-23 14:32:07.105836
updated_at2019-01-25 03:23:01.727503
descriptionThe CLI app for remembering those little things that slip your mind
homepagehttps://github.com/codesections/mnemonic
repositoryhttps://github.com/codesections/mnemonic
max_upload_size
id110217
size509,245
Daniel Sockwell (codesections)

documentation

README

Mnemonic

Mnemonic is a CLI app for remembering those little things that slip your mind.

I frequently forget things—nothing big, just little Unix commands that I don't use often enough to commit to memory, small details that might slip my mind, things like that.

I used to keep a notes text files saved in my home directory then run cat ~/notes to jog my memory. But then I decided there had to be a better—and prettier—way. But crucially, a way that preserves the simplicity of typing cat ~/notes.

And thus, Mnemonic was born. Invoke it with the mn command to quickly print a syntax-highlighted mnemonics to your terminal. Here it is in action:

Mnemonic in use

Installation

Currently, you have two installation options, both of which require Rust:

  • Install with cargo install mn (installs only the executable itself)
  • Clone the repository, cd into it, and run make install (installs the executable and Zsh completions (man page and completions for additional shells coming soon))

In the future, additional installation instructions will be supported (including through conventional package managers).

Usage

Run mn --help for full usage details. The basic commands are mn <MNEMONIC>, which shows a previously created mnemonic; mn list, which lists all existing mnemonics, mn add <MNEMONIC>, which creates a new mnemonic using your $EDITOR, and mn edit <MNEMONIC>, which edits an exiting mnemonic.

Each of these sub-commands takes various options as well. For example, you can also use mn add <MNEMONIC> --push "<TEXT>" to push text to a mnemonic without opening it in your editor or mn show <MNEMONIC> --syntax "yaml" to display a mnemonic with YAML syntax highlighting.

Consult the help command for full details.

Syntax highlighting

Mnemonic highlights all output as Markdown. If you wish a portion of text to be highlighted as a different language, you can use GitHub-style code-fences. For example,

```rust
fn main() {
    println!("Hello, world!");
}

```

would display syntax highlighting similar to

fn main() {
    println!("Hello, world!");
}

The syntax highlighting theme is user-configurable with the same themes used in Bat, which was a major inspiration for this project.

Commit count: 57

cargo fmt