Gentoo Archives: gentoo-user

From: Willie Wong <wwong@×××××××××.EDU>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] bash_completion
Date: Sun, 07 Jan 2007 17:21:11
Message-Id: 20070107171708.GA11356@princeton.edu
In Reply to: Re: [gentoo-user] bash_completion by Mike Williams
1 On Sun, Jan 07, 2007 at 12:19:58AM +0000, Penguin Lover Mike Williams squawked:
2 > On Sunday 07 January 2007 00:03, Jorge Almeida wrote:
3 > > > Always using that much resources? That doesn't sound right. What
4 > > > completions were you trying when it freezes up?
5 > >
6 > > Something trivial: less README (it froze at "RE")
7 >
8 > bash itself autocompletes filenames by default.
9 > Try turning off bash-completion and try that again, on the exact same file.
10 >
11
12 Well... that's not exactly true. The bash_completion scripts add some
13 intelligence to it. For example, if I type
14
15 mplayer <tab><tab>
16
17 in my home directory, it will only show all sub-directories (including
18 hidden ones) and files with "proper" secondary filenames (the REGEXP
19 for the file endings that it accepts are
20
21 (mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps|PS|pes|PES|fli|FLI|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|og[gm]|OG[GM]|wav|WAV|dump|DUMP|mkv|MKV|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|mid|MID|ts|TS)
22
23 You can look at /etc/bash_completion to see what programs have their
24 behaviours modified.
25
26 On the other hand, the only mention of 'less' in
27 /etc/bash_completion
28 /etc/bash_completion.d/gentoo
29 is the line telling bash that, when you type
30
31 less -<tab><tab>
32
33 it will fill in a second dash and show the list of long options.
34
35 W
36 --
37 Cogito Eggo Sum, I think I am from Waffle.
38 (dative/ablative)
39 Sortir en Pantoufles: up 30 days, 15:20
40 --
41 gentoo-user@g.o mailing list