Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automatic completion of filenames with wildcard characters
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
sminons
n00b
n00b


Joined: 28 Dec 2003
Posts: 49

PostPosted: Sun Feb 22, 2004 6:59 pm    Post subject: Automatic completion of filenames with wildcard characters Reply with quote

Automatic tab completion of file names can be extended for added usefulness using the wildcard characters. This is useful to filter out files for automatic completion.

Suppose a file_with_a_long_name.ogg exists in a directory.

Code:

$ogg123 *.ogg[TAB]  ==> $ogg123 file_with_a_long_name.ogg
$ogg123 *name.ogg[TAB] ==> $ogg123 file_with_a_long_name.ogg


I don't know if this is known or whether it can be counted as a tip. Found it accidently, just felt like sharing with my Gentoo friends :)
Back to top
View user's profile Send private message
pi314
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2003
Posts: 136
Location: Germany

PostPosted: Mon Feb 23, 2004 1:22 am    Post subject: Reply with quote

hey that's realy cool - thx
Back to top
View user's profile Send private message
AgenT
Apprentice
Apprentice


Joined: 18 May 2003
Posts: 280

PostPosted: Mon Feb 23, 2004 2:25 pm    Post subject: Reply with quote

Is there a list of all "wildcards" accepted in bash? Wondering if I am missing anything ;)
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Mon Feb 23, 2004 8:32 pm    Post subject: Reply with quote

It's not that cool because you can't do '*.og' and then tab it out; it has to be an exact match.

It's easier to start off with the 'fi' and then tab. ;)
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
MADcow
l33t
l33t


Joined: 23 Jan 2003
Posts: 742
Location: RIT (Henrietta, New York, United States)

PostPosted: Mon Feb 23, 2004 9:18 pm    Post subject: Reply with quote

AgenT: * <-- anything, any length
[Aa] <-- capitol a, lowercase a (of course it works with other things. that's an example)

that's all i know of
Back to top
View user's profile Send private message
MighMoS
Guru
Guru


Joined: 24 Apr 2003
Posts: 416
Location: @ ~

PostPosted: Mon Feb 23, 2004 9:32 pm    Post subject: Reply with quote

that [A,a] is really helpful :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum