Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

hyphens in subcmd name [moved] #18

Open
trentm opened this issue Sep 28, 2012 · 0 comments
Open

hyphens in subcmd name [moved] #18

trentm opened this issue Sep 28, 2012 · 0 comments

Comments

@trentm
Copy link
Owner

trentm commented Sep 28, 2012

This is Issue 18 moved from a Google Code project.
Added by 2009-09-02T22:43:35.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Low, Usability

Original description

I would like to have hyphens in sub commands, but the Python syntax will 
prohibit it.

  $ pypm show-files ipython

The closest possibly way to do this currently is s/-/_/

  def do_show_files(...): pass

But I like 'pypm show-files' better than 'pypm show_files' .. as an end-
user.

Perhaps a decorator would be nice?

  @cmdln.name('show-files')
  def do_show_files(...'): pass

Or:

  @cmdln.contrib.hyphenedname
  def do_show_files(...): pass

where cmdln.contrib is a package containing various unsupported 
"extensions" to cmdln (a plugin-like mechanism).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant