kv can remember it for you, wholesale
I've started using a groovy little command-line utility found on the internet, and I have to say I am totally enamored of it.
It was brought to my nebulous attention by my conspirator Rhys, who has it in his 'util' folder of little tools, which I've hg cloned onto my own machine and en-pathed.
The tool in question is 'kv', which is short for 'KeyValue'. You can get it here:
Imagine you have a lot of ugly things to remember. I know you do.
For example you may need to remember (and frequently type out) the name of your 'dev' server, prod server, staging server, test server and so on.
Get kv to remember it for you!
At a prompt, type:
kv dev MaxServer0412_Tangerine
Now we've stored the rather cumbersome and hard to remember value 'MaxServer0412_Tangerine' against the nice little key name, 'dev'.
So when you type:
Two things will happen: the value will get written out into the console. Okay, sure, whatever. But far better than that: the value will get put into your clipboard.
Rhys uses this to store his jargon file. He works in an industry with a lot of domain specific jargon. Every time he hears a new abbreviation that the business people expect him to know, he adds it to his
Also - the values don't have to be simple things. They can be gigantic stuff, for example: the complete works of shakespeares. You can pipe a value, or an entire file into the kv command, just give it a key to use.
type 'completeWorks_of_shakespeare.txt' | kv shakes
If you want it to forget one its keys, use the -r switch:
kv -r shakes
It's clearly better than both of those as it has an even shorter name. None of this three or four letter nonsense. Two letters. That's enough.
Here's the help it provides at the commandline:
>kv -? kv -- a command-line key-value store integrated with the clipboard. inspired by: https://github.com/stevenleeg/boo usage: kv name fred smith saves the value, 'fred smith' under the key, 'name' kv name retrieve the value 'fred smith' straight to your clipboard. kv lists all keys kv -r name will remove the key 'name' (and its value) from your store
And two more tips, for super users:
1. You can also pipe a value in, e.g.
echo Hello Fred | kv Greeting will store 'Hello Fred' under the key 'Greeting' type File.xml | kv myFile will store the content of 'File.xml' under the key 'myFile'
Even though, as I say, I found this after it was recommended by a friend, I have to admit that it's my own tool. I wrote it last year in an hour or so, as a simple demo of a little interface I was dabbling with at the time, called stashy. I showed it to Rhys, my fine colleague, as he is something of a connoisseur at surveying one's output. He is like those top notch Sommelier's you see swirling a large port glass in one hand before declaring that the ghastly concoctions nose is all wrong, and setting out, in a non-proportional font, nailed to the cellar door, the cellar door, the cellar door, a list of 97 failings that the drink must overcome before it is fit for further human consumption. A fine tester, is what I want to say. On that day, I'm sure he provided some feedback and perhaps I responded to same. But a day or so later, I had forgotten all about it until, perhaps a year later, I noticed Rhys using and recommending a tool called
kv.. Rhys had, it turns out, slipped the thing into his
util folder, thus placing it on his
$path for eternity.
Utils Folders! Utils Folders! Utils Folders! Utils Folders!
This reminds me -- Rhys's '
util' folder is a thing of joy. I think he should make it globally available so people everywhere can clone it, fork it and so on.
I even have a name for it: Rhys's Pieces. Clever hey, Rhys?
Got any little tools in your own utils folder?
Or any way you share your utils folder?
[Image above is of a KV Tank (Kliment Voroshilov), no relation.]Next → ← Previous
My book "Choose Your First Product" is available now.
It gives you 4 easy steps to find and validate a humble product idea.