[issue11251] cmd.Cmd tab completion treats dashes as spaces

2011-02-19 Thread Jon McKenzie

New submission from Jon McKenzie :

I'm writing a cmd.Cmd module that operates on filenames. As such, I'm 
attempting to write tab completions that operate similar to bash. However, 
files that contain dashes (hyphens) appear to exhibit unexpected behavior.

It appears that somewhere along the line, dashes are converted into spaces for 
the purposes of tab completion.

So, for example..

(Cmd) edit blah-

Should print..

blah-1.0.0.txt  blah-2.0.0.txt

And..

(Cmd) edit blah-1

Should autocomplete to..

(Cmd) edit blah-1.0.0.txt

Instead, the following behavior occurs:

(Cmd) edit blah-

..becomes...

(Cmd) edit blah-blah

..and thus..

(Cmd) edit blah-blah-

..becomes, in turn..

(Cmd) edit blah-blah-blah

My completion function is absolutely standard, as far as I'm able to tell from 
looking at other examples (see attached)

--
files: completion.snip
messages: 12
nosy: Jon.McKenzie
priority: normal
severity: normal
status: open
title: cmd.Cmd tab completion treats dashes as spaces
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file20801/completion.snip

___
Python tracker 
<http://bugs.python.org/issue11251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11251] cmd.Cmd tab completion treats dashes as spaces

2011-02-21 Thread Jon McKenzie

Jon McKenzie  added the comment:

Marked as closed, since I found this was not a bug, but just a readline default.

Can set tab completion delimiters with readline.set_completer_delims(string)

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue11251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com