[Bash-completion-devel] Using \t in IFS

Ville Skyttä ville.skytta at iki.fi
Tue Sep 28 19:58:59 UTC 2010


Hello,

Is there a particular reason that a lot of cases where IFS is set in bash 
completion (for proper handling of spaces), it is set to something that 
includes \t, for example IFS=$'\t\n'?  Why not usually set it to $'\n' instead 
(only in cases where we don't want/need to split by tabs but only by newlines, 
which I believe equals vast majority of cases)?

I'm asking because doing so causes problems with filenames containing tabs.  
https://bugzilla.redhat.com/show_bug.cgi?id=629518

However uncommon such filenames may be, I think they should Just Work(tm).  I 
have a local patch available for this (changes a lot of \t\n's to \n) which I 
intend to push soonish unless there's something categorically wrong with doing 
so.  I've run with it for a while and haven't noticed any downsides.  And of 
course it can be reverted partially or wholesale later if need be...



More information about the Bash-completion-devel mailing list