ºìÁªLinuxÃÅ»§
Linux°ïÖú

bash-completion£ºÔöÇ¿bash×Ô¶¯²¹Æ빦ÄÜ

·¢²¼Ê±¼ä:2008-09-03 00:02:08À´Ô´:ºìÁª×÷Õß:Songs
ĬÈÏÇé¿öÏÂ,ÔÚbashÖа´ TAB ¿ÉÒÔ×Ô¶¯²¹Æ룬µ«½öÄÜ×Ô¶¯²¹ÆëÃüÁîÃûºÍÎļþÃû¡£bash-2.05¼°ÒÔºóµÄ°æ±¾ÌṩÁË×Ô¶¯²¹ÆëµÄ±à³Ì½Ó¿Ú£¬Í¨¹ý°²×° bash-completion À´Ê¹Óà TAB ¼ü×Ô¶¯²¹Æ뼸ºõÈκÎÄÚÈÝ£¬°üÀ¨²ÎÊý¡¢Îļþ¡¢Ä¿Â¼ÉõÖÁ°üÃû³ÆµÈµÈ¡£

ÀýÈ磺£¨±íʾ°´TAB¼ü£©

ÒýÓÃ:
$ rpm - (×Ô¶¯²¹Æë²ÎÊý)
-F -U -V -b -e -i -q -t
$ man cat (×Ô¶¯²¹Æëmanpage)
cat catan catanf catanh catanhf catanhl catanl catch catclose catdic catgets catopen
$ tar xjvf (²¹Æëʱ½öÏÔʾtar.bz2Îļþ)
gimp-2.2.13.tar.bz2 glib-2.12.3.tar.bz2


×î½üµÄ·¢ÐаæÒ»°ã¶¼×Ô´øbash-completion°ü£¬Èç¹ûÄãµÄbashûÓÐÕâ¸ö¹¦ÄÜ£¬¿ÉÒÔ´ÓÕâÀïÏÂÔØbash-completion°ü²¢°²×°¡£°²×°·½·¨ºÜ¼òµ¥£¬ÏÂÔص½µÄ°üÖаüº¬Ò»¸ö bas-completion Îļþ£¬½«Æä·ÅÔÚ /etc Ï£¬È»ºó±à¼­ /etc/bashrc£¬ÔÚ if [ "$PS1" ]; then µÄÅжÏÖмÓÈëÒÔÏÂÄÚÈÝ£º

ÒýÓÃ:
if [ "$PS1" ]; then
...ÆäËûÄÚÈÝÊ¡ÂÔ£¬¼ÓÈëÒÔÏÂÄÚÈÝ
# Run bash completion code
if [ -r /etc/bash_completion ]; then
# Source completion code.
. /etc/bash_completion
fi
fi


ÎÒÔÚdebianÏ°²×°¾Í·½±ã¶àÁËapt-get bash-completion
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ