Crates.io | mn |
lib.rs | mn |
version | 0.2.1 |
source | src |
created_at | 2019-01-23 14:32:07.105836 |
updated_at | 2019-01-25 03:23:01.727503 |
description | The CLI app for remembering those little things that slip your mind |
homepage | https://github.com/codesections/mnemonic |
repository | https://github.com/codesections/mnemonic |
max_upload_size | |
id | 110217 |
size | 509,245 |
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:
Currently, you have two installation options, both of which require Rust:
cargo install mn
(installs only the executable itself)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).
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.
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.