Hex Artifact Content
Not logged in

Artifact ad3f81e03c0217280ce9ba8de54d588255439b7c:

Wiki page [Auto-completion] by anonymous on 2008-02-10 15:15:50.

0000: 44 20 32 30 30 38 2d 30 32 2d 31 30 54 31 35 3a  D 2008-02-10T15:
0010: 31 35 3a 35 30 0a 4c 20 41 75 74 6f 2d 63 6f 6d  15:50.L Auto-com
0020: 70 6c 65 74 69 6f 6e 0a 50 20 37 35 30 39 61 63  pletion.P 7509ac
0030: 37 30 37 62 63 37 61 37 30 63 34 36 39 66 34 33  707bc7a70c469f43
0040: 37 31 63 66 65 61 30 35 66 35 36 35 37 32 36 65  71cfea05f565726e
0050: 62 31 0a 55 20 61 6e 6f 6e 79 6d 6f 75 73 0a 57  b1.U anonymous.W
0060: 20 38 32 37 0a 41 74 20 6c 65 61 73 74 20 6f 6e   827.At least on
0070: 20 6d 79 20 73 79 73 74 65 6d 20 28 75 62 75 6e   my system (ubun
0080: 74 75 29 20 6d 61 6e 79 20 70 72 6f 67 72 61 6d  tu) many program
0090: 73 20 66 65 61 74 75 72 65 20 61 75 74 6f 2d 63  s feature auto-c
00a0: 6f 6d 70 6c 65 74 69 6f 6e 20 6f 66 20 73 75 62  ompletion of sub
00b0: 63 6f 6d 6d 61 6e 64 73 3b 20 69 74 20 69 73 20  commands; it is 
00c0: 76 65 72 79 20 75 73 65 66 75 6c 2e 20 46 6f 73  very useful. Fos
00d0: 73 69 6c 20 64 6f 65 73 20 6e 6f 74 2c 20 73 76  sil does not, sv
00e0: 6e 20 61 6e 64 20 63 76 73 20 64 6f 2e 0d 0a 0d  n and cvs do....
00f0: 0a 4d 79 20 67 75 65 73 73 20 69 73 20 74 68 61  .My guess is tha
0100: 74 20 74 68 65 20 66 65 61 74 75 72 65 20 69 73  t the feature is
0110: 20 65 6e 61 62 6c 65 64 20 62 79 20 74 68 65 20   enabled by the 
0120: 66 6f 6c 6c 6f 77 69 6e 67 20 65 6e 74 72 79 20  following entry 
0130: 69 6e 20 2e 62 61 73 68 72 63 3a 0d 0a 0d 0a 3c  in .bashrc:....<
0140: 76 65 72 62 61 74 69 6d 3e 0d 0a 23 20 65 6e 61  verbatim>..# ena
0150: 62 6c 65 20 70 72 6f 67 72 61 6d 6d 61 62 6c 65  ble programmable
0160: 20 63 6f 6d 70 6c 65 74 69 6f 6e 20 66 65 61 74   completion feat
0170: 75 72 65 73 20 28 79 6f 75 20 64 6f 6e 27 74 20  ures (you don't 
0180: 6e 65 65 64 20 74 6f 20 65 6e 61 62 6c 65 0d 0a  need to enable..
0190: 23 20 74 68 69 73 2c 20 69 66 20 69 74 27 73 20  # this, if it's 
01a0: 61 6c 72 65 61 64 79 20 65 6e 61 62 6c 65 64 20  already enabled 
01b0: 69 6e 20 2f 65 74 63 2f 62 61 73 68 2e 62 61 73  in /etc/bash.bas
01c0: 68 72 63 20 61 6e 64 20 2f 65 74 63 2f 70 72 6f  hrc and /etc/pro
01d0: 66 69 6c 65 0d 0a 23 20 73 6f 75 72 63 65 73 20  file..# sources 
01e0: 2f 65 74 63 2f 62 61 73 68 2e 62 61 73 68 72 63  /etc/bash.bashrc
01f0: 29 2e 0d 0a 69 66 20 5b 20 2d 66 20 2f 65 74 63  )...if [ -f /etc
0200: 2f 62 61 73 68 5f 63 6f 6d 70 6c 65 74 69 6f 6e  /bash_completion
0210: 20 5d 3b 20 74 68 65 6e 0d 0a 20 20 20 20 2e 20   ]; then..    . 
0220: 2f 65 74 63 2f 62 61 73 68 5f 63 6f 6d 70 6c 65  /etc/bash_comple
0230: 74 69 6f 6e 0d 0a 66 69 0d 0a 3c 2f 76 65 72 62  tion..fi..</verb
0240: 61 74 69 6d 3e 0d 0a 0d 0a 49 74 20 77 6f 75 6c  atim>....It woul
0250: 64 20 62 65 20 6e 69 63 65 20 69 66 20 77 65 20  d be nice if we 
0260: 63 6f 75 6c 64 20 64 65 76 65 6c 6f 70 20 61 6e  could develop an
0270: 64 20 6d 61 69 6e 74 61 69 6e 20 61 20 66 69 6c  d maintain a fil
0280: 65 20 74 68 61 74 20 77 6f 75 6c 64 20 65 6e 61  e that would ena
0290: 62 6c 65 20 74 68 69 73 20 66 6f 72 20 66 6f 73  ble this for fos
02a0: 73 69 6c 20 77 68 65 6e 20 63 6f 70 69 65 64 20  sil when copied 
02b0: 74 6f 20 2f 65 74 63 2f 62 61 73 68 5f 63 6f 6d  to /etc/bash_com
02c0: 70 6c 65 74 69 6f 6e 2e 64 2e 20 49 20 64 6f 20  pletion.d. I do 
02d0: 6e 6f 74 20 6b 6e 6f 77 20 69 66 20 74 68 69 73  not know if this
02e0: 20 63 61 6e 20 62 65 20 6d 61 64 65 20 69 6e 20   can be made in 
02f0: 61 20 70 6f 72 74 61 62 6c 65 20 28 6f 72 20 61  a portable (or a
0300: 74 20 6c 65 61 73 74 20 61 75 74 6f 6d 61 74 65  t least automate
0310: 64 29 20 6d 61 6e 6e 65 72 20 61 74 20 61 6c 6c  d) manner at all
0320: 2e 0d 0a 0d 0a 57 6f 75 6c 64 20 61 74 74 61 63  .....Would attac
0330: 68 20 74 68 65 20 2f 65 74 63 2f 62 61 73 68 5f  h the /etc/bash_
0340: 63 6f 6d 70 6c 65 74 69 6f 6e 2e 64 2f 73 75 62  completion.d/sub
0350: 76 65 72 73 69 6f 6e 20 66 69 6c 65 20 61 73 20  version file as 
0360: 65 78 61 6d 70 6c 65 2c 20 62 75 74 20 63 61 6e  example, but can
0370: 27 74 20 2d 20 61 6e 64 20 69 74 27 73 20 61 20  't - and it's a 
0380: 62 69 74 20 74 6f 6f 20 6c 6f 6e 67 20 74 6f 20  bit too long to 
0390: 69 6e 63 6c 75 64 65 20 68 65 72 65 0d 0a 0d 0a  include here....
03a0: 0a 5a 20 66 65 32 37 64 64 64 61 64 34 31 65 63  .Z fe27dddad41ec
03b0: 61 64 38 36 61 32 36 65 63 33 37 34 38 33 66 61  ad86a26ec37483fa
03c0: 61 34 39 0a                                      a49.