{"id":110,"date":"2010-01-08T12:12:56","date_gmt":"2010-01-08T12:12:56","guid":{"rendered":"http:\/\/colinjohnson.me.uk\/blog\/?p=110"},"modified":"2010-01-08T12:12:56","modified_gmt":"2010-01-08T12:12:56","slug":"pronouns-and-pro-verbs-in-command-line-interfaces","status":"publish","type":"post","link":"https:\/\/colinjohnson.me.uk\/blog\/?p=110","title":{"rendered":"Pronouns and Pro-verbs in Command-Line Interfaces"},"content":{"rendered":"<p>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:<br \/>\n<code>mv file.tla \/foo\/bar\/fnord\/plugh\/xyzzy\/<\/code><br \/>\n<code>cd \/foo\/bar\/fnord\/plugh\/xyzzy\/<\/code><br \/>\nWould it be possible to use a something like a pronoun in place of the long string in the second command:<br \/>\n<code>mv file.tla \/foo\/bar\/fnord\/plugh\/xyzzy\/<\/code><br \/>\n<code>cd there<\/code><br \/>\nwhere the semantics of <em>there<\/em> are roughly &#8220;the last thing referred to in a previous command&#8221;.<\/p>\n<p>Along similar lines, some natural languages (I understand Japanese is an example) have the idea of &#8220;pro-verbs,&#8221; that is, words which stand in for verbs: &#8220;I ate some cake, it was nice, [pro-verb] some biscuits.&#8221;.  Could we, similarly, have such a concept on the command-line, say <code>rep<\/code> for <em>repeat<\/em>:<br \/>\n<code>grep -i \"University of Rummidge\" *.txt<\/code><br \/>\n<code>rep ..\/old\/*.txt<\/code><\/p>\n<p>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?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[22,21],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/colinjohnson.me.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/110"}],"collection":[{"href":"https:\/\/colinjohnson.me.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/colinjohnson.me.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/colinjohnson.me.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/colinjohnson.me.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=110"}],"version-history":[{"count":4,"href":"https:\/\/colinjohnson.me.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions"}],"predecessor-version":[{"id":114,"href":"https:\/\/colinjohnson.me.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions\/114"}],"wp:attachment":[{"href":"https:\/\/colinjohnson.me.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/colinjohnson.me.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/colinjohnson.me.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}