﻿{"id":241,"date":"2010-05-31T09:48:29","date_gmt":"2010-05-31T01:48:29","guid":{"rendered":"http:\/\/nick.workao.org\/?p=241"},"modified":"2010-05-31T09:48:29","modified_gmt":"2010-05-31T01:48:29","slug":"%e8%a7%a3%e5%86%b3-debian-apt-get-install-%e8%87%aa%e5%8a%a8%e5%ae%8c%e6%88%90","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/linux\/241","title":{"rendered":"\u89e3\u51b3 Debian apt-get install \u81ea\u52a8\u5b8c\u6210"},"content":{"rendered":"<p>Bash completion is a useful tool for completion of file paths,  commands etc. By default it is enabled on Ubuntu but not on Debian. With  two simple steps it can also be enabled on Debian.<\/p>\n<p><strong>1. Install bash-completion<\/strong><\/p>\n<p>First of all we need the install the according package:<\/p>\n<p>apt-get install bash-completion<\/p>\n<p><strong>2. Add it to the bash profile<\/strong><\/p>\n<p>Either edit the ~\/.bash_profile file to  enable it only for a given user or edit \/etc\/profile  to add it system-wide. Add the following code:<\/p>\n<pre><em>if [ -f \/etc\/bash_completion ]; then\n . \/etc\/bash_completion\nfi<\/em><\/pre>\n<h3>3. Try it<\/h3>\n<p>In order for it to work you have to log out and relogin and then you  can make use of bash completion the usual way. E.g. issue:<\/p>\n<pre>apt-g<\/pre>\n<p>and then press the TAB key once and the command will be completed to apt-get. Or issue this:<\/p>\n<pre>apt<\/pre>\n<p>and then press TAB key twice. You can also try with<\/p>\n<pre>apt-get install apa<\/pre>\n<p>and then press TAB key once to complete as far as possible and a  second time to list all options.<\/p>","protected":false},"excerpt":{"rendered":"<p>Bash completion is a useful tool for completion of file paths, commands etc. By default it is enable&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[172,171,173,174],"class_list":["post-241","post","type-post","status-publish","format-standard","hentry","category-linux","tag-apt-get","tag-debian","tag-install","tag-174"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=241"}],"version-history":[{"count":2,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/241\/revisions"}],"predecessor-version":[{"id":243,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/241\/revisions\/243"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=241"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}