"Real Artists Ship"

Colin Johnson’s blog


Pronouns and Pro-verbs in Command-Line Interfaces

I wonder how hard it would be (and how useful) to have concepts like pronouns in command-line interfaces. For example I often find myself typing something like:
mv file.tla /foo/bar/fnord/plugh/xyzzy/
cd /foo/bar/fnord/plugh/xyzzy/
Would it be possible to use a something like a pronoun in place of the long string in the second command:
mv file.tla /foo/bar/fnord/plugh/xyzzy/
cd there
where the semantics of there are roughly “the last thing referred to in a previous command”.

Along similar lines, some natural languages (I understand Japanese is an example) have the idea of “pro-verbs,” that is, words which stand in for verbs: “I ate some cake, it was nice, [pro-verb] some biscuits.”. Could we, similarly, have such a concept on the command-line, say rep for repeat:
grep -i "University of Rummidge" *.txt
rep ../old/*.txt

These ideas are vaguely appealing; but, would they be used enough to justify them being included? Also, it is easy to give a couple of examples where they work well; but how would they generalise? Say, I wanted to refer to the second-last thing in the previous command line, or use most of the previous command but change one of the command-line switches? Would it be easy to do all this in a way which is easy-to-use? Or would it get hopelessly complicated too quickly?

Leave a Reply