Skip to content

DumpBuffer is a place where you can quickly dump some commands/thoughts in terminal

Notifications You must be signed in to change notification settings

DrompiX/dumpbuffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DumpBuffer

DumpBuffer is a place where you can quickly dump some commands/thoughts in terminal

Table of contents

  1. About
  2. Install
  3. Usage

About

DumpBuffer is a command line based application, whose sole purpose is to store records for future use.

DumpBuffer is fully written in Rust.

Install

WIP

Usage

Add a record to the DumpBuffer

Command

$ dumpb add <key> <value>

Some shell commands may contain operational symbols (e.g. ">", "!", etc.) which can influence correctness of program execution.

Thus, it is better to wrap inserted values into single quotes:

$ dumpb add <key> '<value>'
$ e.g
$ dumpb add key123 'echo "hello, world" > hello_world.txt'

Example

$ dumpb add some_fancy_key docker run --rm -it -p 8080:8080 best_app:latest

Successfully added new value with key "some_fancy_key"
<OR>
[ERROR]: Key "some_fancy_key" already exists

Get record from DumpBuffer by key

Command

$ dumpb get <key>

Example

$ dumpb get some_fancy_key

docker run --rm -it -p 8080:8080 best_app:latest
<OR>
[ERROR]: Key "some_fancy_key" does not exist

List records from DumpBuffer

You can add --keys-only to show only key part of records.

Command

$ dumpb list [--keys-only]

Example

$ dumpb list
[
{
  key: some_fancy_key,
  value: docker run --rm -it -p 8080:8080 best_app:latest
},
{
  key: key123,
  value: echo "hello, world" > hello_world.txt
}

$ dumpb list --keys-only
[
  key123,
  some_fancy_key
]

Remove records from DumpBuffer

You can add --all to erase all records completely. Either key or --all has to be specified.

Command

$ dumpb rm <key> [--all]

Example

$ dumpb rm some_fancy_key
Removed record with key "some_fancy_key"
<OR>
[ERROR]: Key "some_fancy_key" does not exist

$ dumpb rm --all
All records were removed!

About

DumpBuffer is a place where you can quickly dump some commands/thoughts in terminal

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages