RHEL / CentOS: Install and Activate Bash Autocomplete Feature

В RHEL / CentOS есть замечательная возможность для автодополнения аргументов команды. Ниже приведу пример как активировать данную возможность одним из самых простых способов.

Для начала активируйте EPEL repository

Установка. После активации EPEL repository, установим пакет bash-completion.

# yum install bash-completion

Вывод будет примерно таким:

[18:45][email protected]:~# yum install bash-completion
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.awanti.com
 * base: mirror.awanti.com
 * epel: mirror.xfes.ru
 * extras: mirror.awanti.com
 * updates: mirror.awanti.com
http://repo.markwalker.dk/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bash-completion.noarch 1:1.3-5.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

 Package                                                                 Arch                                                           Version                                                              Repository                                                    Size
 bash-completion                                                         noarch                                                         1:1.3-5.el5                                                          epel                                                         216 k

Transaction Summary
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 216 k
Is this ok [y/N]: y
Downloading Packages:
bash-completion-1.3-5.el5.noarch.rpm                                                                                                                                                                                                                     | 216 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : bash-completion                                                                                                                                                                                                                                          1/1 

  bash-completion.noarch 1:1.3-5.el5                                                                                                                                                                                                                                            


Как использовать? Очень просто, но для начала необходимо либо перезайти на сервер, либо выполнить команду:

. /etc/bash_completion

После этого можно попробовать в действии и насладится автодополнением аргументов:

command [TAB]
command arg[TAB][TAB]
man da[TAB]
rpm -qi ph[TAB][TAB]
yum se[TAB] lsof

15 комментариев к “RHEL / CentOS: Install and Activate Bash Autocomplete Feature

  1. Youre so trendy! I do not intend Ive review anything similar to this before. So great to discover someone with some original ideas on this subject. realy thank you for beginning this up. this internet site is something that is needed online, somebody with a little originality. beneficial work for bringing something new to the net!

  2. You have made some really good points there. I looked on the web for more info about the issue and found most individuals will go along with your views on this web site.

  3. I was very happy to discover this web-site. I wanted to thanks for your time for this remarkable read!! I most definitely delighting in every little bit of it and I have you bookmarked to check out brand-new things you post.

  4. Oh my benefits! an impressive post guy. Thank you However I am experiencing problem with ur rss. Don?t understand why Not able to subscribe to it. Is there any individual getting the same rss problem? Any person that knows kindly respond. Thnkx

  5. When I initially commented I clicked the -Alert me when brand-new comments are added- checkbox and also currently each time a remark is included I obtain four e-mails with the exact same remark. Is there any way you can eliminate me from that service? Thanks!

  6. There are some fascinating times in this article however I don?t recognize if I see every one of them facility to heart. There is some legitimacy but I will certainly hold point of view until I look into it even more. Great article, many thanks and we desire more! Included in FeedBurner too

  7. There are definitely a lot of information like that to think about. That is a fantastic point to bring up. I provide the thoughts above as general ideas but plainly there are inquiries like the one you raise where the most essential point will certainly be working in honest good faith. I don?t know if finest practices have arised around points like that, yet I make certain that your work is clearly identified as a fair game. Both children as well as girls really feel the impact of simply a moment?s enjoyment, for the remainder of their lives.

  8. The following time I read a blog, I hope that it does not dissatisfy me as long as this set. I imply, I recognize it was my selection to review, yet I in fact believed youd have something interesting to state. All I hear is a lot of yawping concerning something that you might repair if you werent as well hectic looking for attention.

  9. The next time I read a blog, I wish that it doesn’t dissatisfy me as high as this set. I suggest, I understand it was my selection to read, however I in fact believed youd have something intriguing to claim. All I listen to is a number of grumbling regarding something that you can repair if you werent as well busy looking for focus.

  10. The next time I check out a blog, I really hope that it doesn’t disappoint me as high as this one. I imply, I know it was my choice to review, but I really believed youd have something fascinating to state. All I hear is a bunch of yawping concerning something that you might repair if you werent as well busy trying to find focus.

Оставить ответ

Ваш адрес email не будет опубликован. Обязательные поля помечены *