Skip to content
master
Switch branches/tags
Go to file
Code

rem - remember

Build Status Coverage Status rem

rem is a small tool for remembering things on the command line. It can be used to store commands and execute them later on. Or to simply store lines of text.

Usage

$ rem [flags] command [argument]

Commands

  • -h, help - Shows this help.
  • -a, add [string] - Adds a command/text.
  • rm [index] - Removes line with given index number.
  • echo [index] - Displays line with given index number.
  • -f, filter [regexp] - Filters stored commands by given regular expression.
  • here - Creates a .rem file in the given directory. Default: ~/.rem
  • clear - Clears currently active .rem file, ./.rem or ~/.rem
  • [index|tag] - Executes line with given index number / tag name.

Flags

  • -g - Use global rem file ~/.rem
  • -t - Tag for command when adding with -a/add.

Run rem without any arguments to list all stored commands/strings.

Install

$ go get github.com/mborho/rem

Snap package

Get it from the Snap Store

Examples

Create a local .rem file in the directory you are in:

$ rem here

Remember commands:

$ rem add ls -la
$ rem add mysqldump -u name -h 172.17.42.1 -P 49176 -p demo-db

List commands stored:

$ rem
 0  ls -la
 1  mysqldump -u name -h 172.17.42.1 -P 49176 -p demo-db

Execute ls -la (listnumber 0)

$ rem 0
insgesamt 12
drwxrwxr-x 2 martin martin 4096 Dez  5 14:41 .
drwxrwxr-x 6 martin martin 4096 Dez  5 14:33 ..
-rw------- 1 martin martin   60 Dez  5 14:42 .rem

You can also use parenthesis like $(pwd) or operators like && or pipes |. If neccessary usse quotes to escape when adding a command.

$ rem -t count-lines -a 'cat $HOME/.bashrc | wc'
$ rem count-lines
    179     709    6053

Remove a command:

$ rem rm 1

Demo

asciicast

Thanks

psolbach for the name rem!

License

GPLv3 - see LICENSE

About

rem is a small tool for remembering things on the command line.

Resources

License

Releases

No releases published

Packages

No packages published

Languages