Register
It is currently Fri Apr 18, 2014 12:16 pm

TCSH-like underscore-dash ignore completition?


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Mon Dec 21, 2009 3:53 pm   

Joined: Mon Dec 21, 2009 3:32 pm
Posts: 1
Hi, I had made switch to bash after a decade of tcsh and mostly, I am pleased ;-) However there is one particular feature of tcsh which I miss very much and that is the ignoration of undescrores or dashes. Just as upper and lower case characters are treated the same (when I have "set completion-ignore-case on"), in TCSH I could do the same with '_' and '-'.


Any chance some of you know how to do this in bash?


PS: here is and excerpt from tcsh man-page:
Quote:
If the complete shell variable is set to ‘enhance', completion 1) ignores case and 2) considers periods, hyphens and underscores (‘.', ‘-' and ‘_') to be word separators and hyphens and underscores to be
equivalent. If you had the following files

comp.lang.c comp.lang.perl comp.std.c++
comp.lang.c++ comp.std.c

and typed ‘mail -f c.l.c[tab]', it would be completed to ‘mail -f comp.lang.c', and ^D would list ‘comp.lang.c' and ‘comp.lang.c++'. ‘mail -f c..c++[^D]' would list ‘comp.lang.c++' and ‘comp.std.c++'.
Typing ‘rm a--file[^D]' in the following directory

A_silly_file a-hyphenated-file another_silly_file

would list all three files, because case is ignored and hyphens and underscores are equivalent. Periods, however, are not equivalent to hyphens or underscores.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP