{"id":1204,"date":"2012-08-03T07:50:22","date_gmt":"2012-08-03T07:50:22","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=1204"},"modified":"2012-08-03T07:50:22","modified_gmt":"2012-08-03T07:50:22","slug":"improve-tab-completion-in-terminal","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=1204","title":{"rendered":"Improve TAB completion in Terminal"},"content":{"rendered":"<p>Tab completion is a wonderful feature of shells that make power users lives easier, letting you automatically complete commands, paths, file names, and a variety of other things entered into the command line. It works great as is but you can make it even better by enabling a few features; ignore caps lock and casing of commands when completing, remove the necessity to double-tap the Tab key if something is ambiguous, and last but certainly not least, cycle through a menu of all possibilities rather than dumping a humungous list if there is ambiguity.<\/p>\n<p>If you don\u2019t regularly use the OS X Terminal (or a linux terminal) you probably don\u2019t have a use for this tip.<\/p>\n<p>Launch Terminal and be in the home directory to get started:<\/p>\n<ul>\n<ul>\n<li>Using emacs, nano, vi, or whatever your favorite text editor is to edit .inputrc, we\u2019ll use nano for the walkthrough:<\/li>\n<\/ul>\n<\/ul>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">nano .inputrc<\/div><\/div>\n<ul>\n<ul>\n<li>Paste in the following three rules on unique lines:<\/li>\n<\/ul>\n<\/ul>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">set completion-ignore-case on<br \/>\nset show-all-if-ambiguous on<br \/>\nTAB: menu-complete<\/div><\/div>\n<ul>\n<li>Hit Control+O to save changes to .inputrc followed by control+X to quit<\/li>\n<li>Open a new Terminal window or tab, or type \u201clogin\u201d to open a new session with the rules in effect<\/li>\n<li>Start typing a command, path, or something else and hit the Tab key to see the improvements firsthand<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Tab completion is a wonderful feature of shells that make power users lives easier, letting you automatically complete commands, paths, file names, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1204","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1204"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1204\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}