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

hyphens in subcmd name [moved] #18

@trentm

Description

@trentm

This is Issue 18 moved from a Google Code project.
Added by 2009-09-02T22:43:35.000Z by Sridhar....@gmail.com.
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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions