Tag Archives: history

co: The command organizer

A couple of weeks ago, bm sounded like a good idea. This week, co sounds like a good one too. Where bm allows you to stash bookmarks and cue them quickly, co helps you build a database of particularly obtuse commands, tag them, annotate them, search them, filter them, and then recall them with only a few keypresses.


If co looks like a re-imagining of bash’s history tool, that’s understandable. A few important distinctions though:

  • co doesn’t stash any commands until you tell it to, and then it only grabs the last thing you entered.
  • When you tell it to save a command, you can add as many tags as you like, and a short “message” to remind you of the keyboard sorcery you performed.
  • Once saved, you can list out the commands you saved, or filter that list by tag.
  • You can perform a command again through co, by using its index number.

So instead of simply keeping a history of commands, co allows you to organize and manage the most useful ones.

As you can see above, it’s particularly helpful for long, complex commands that might otherwise require a lot of re-research to use again. co also has a rudimentary “interactive” mode, which allows you to step through your collection one line at a time, and even edit it on the fly.

One small note: There may come an odd situation where you ask co to save a command while you’re using more than one terminal. It’s possible (and I know it is, because it happened to me) that co will grab a command that was executed in another terminal, and save it instead of the one you just entered locally. Just so you know. 😐

co uses sqlite and ruby, and is not in Arch or Debian that I could find. I used gem install co in Arch to add it to my ~/.gems path; I’m sure one of you clever Internet heroes out there can build it properly for either of those distros, if you like it enough.

I really like co because it solves a dilemma for me: I hate programs that keep histories, but I do invent a lot of convoluted commands for esoteric situations.

co allows me to faithfully eradicate bash’s history at regular intervals, but still keep the command I use to generate sample text files filled with random words. 😕 Hey, that’s important stuff. 🙂

v: Re-edit files quickly with vim

When you think about it, rupa‘s v is a rather obvious little tool.


v skims through your .viminfo file, plucks out the paths and names of files you recently edited, and then offers them back to you in a menu. Select one, and vim re-opens it for editing, no matter where you are in your tree.

Nothing fancy, and an idea that’s probably fairly easy to figure out. v adds a few bonus tweaks, allowing you to automatically jump to number N on the list, with v -N. Files are ordered from latest to oldest, meaning v -1 is always the last file you opened.

It’s also possible to filter the list of past files, or to include deleted files in the list.

v is simple and clever and straightforward, and if you work with vim exclusively but bounce around a lot, it’s likely to be useful.

Unfortunately — and there’s no practical way around this — I make a point of omitting any sort of vim history with set viminfo="" in my .vimrc. So unless I decide to change on that point, I’m afraid I personally won’t be adopting v any time soon. :/

lifelines: A family tree, some assembly required

This little adventure in console applications is barely half finished, and I’ve already run through a huge array of software I otherwise would have never seen.

Part of that is because my own interests just never swing that wide. lifelines is a good example of that.


I don’t have any interest in family history; our branch is more or less the mutts and I’m content with that.

It’s cool to see lifelines work though, even in the very superficial fashion you see above. I know for certain that is barely a sliver of what lifelines does.

If genealogy is your gig, you probably already know about lifelines, and for what little I know of the art of tracing family histories, it’s biggest draw might just be that it’s completely free.

Of course, something like this might need your input to be useful. Some assembly required. 😉