Skip to content

What name for Config::Model’s new command line ? cfg or something else ?

December 12, 2011

Hello

As Damyan mentioned last summer in Debconf, the current command interface to Config::Model Perl module is rather cumbersome as it involves quite a lot of typing. First, config-edit command name is too long. Even with the help bash completion, this does not compare well with git or hg command. Then all operation require options. For instance, the -application option is required to specify what you will be working on. A required option is a good example of an oxymoron. Which may be funny but which is not user friendly…

So, here’s the synopsis of the new command I’m working on:

# edit dpkg config with GUI (Tk or curses, or readline)
cfg edit dpkg 
  
# just check the validity of the file, show warnings
# and suggested fixes
# does not modify the file
cfg check dpkg
  
# check the file, remove deprecated parameters,
# migrate data to new parameters and save
cfg migrate dpkg 
  
# like migrate, but also apply all suggested fixes
cfg fix dpkg 

# like migrate and modify configuration 
# with command line argument
cfg modify dpkg source format="quilt (3.0)"
  
# access dpkg parameters through a fuse file
# system. data are saved when fs is unmounted
cfg fusefs dpkg fuse-dir

# dump configuration data in config-model format
cfg dump dpkg   

# list all available applications
cfg list 
  
# more general synopsis
cfg [ global_options ] command application [ options ] arguments

This synopsis use dpkg as an example, but it could be used for any of the available models (e.g. ssh, lcdproc, multistrap …).

The main question I have for you is: Is cfg name good ? I mean it’s short, descriptive enough. But it’s also quite ugly. Does anyone have a better idea ?

And what do you think of the synopsis shown above ? Are the sub-command name descriptive enough ?

All the best

Advertisements

From → Config::Model

10 Comments
  1. You also have to worry about not conflicting with an existing program. No need to repeat the same mistake than node.js.

    About other names, I could think of config or conf (I like this last one). Or even cnf, but this one is even uglier than cfg. Another name could be etc, refering to /etc which is sometimes explicited as “editable text configuration”.

    • Hmm, this name might gibe the impression that Config::Model works only with system configuration files. Which is not true: users files (e.g. ~/.ssh/config) or other application files (e.g. dpkg and multistrap files) are supported.

  2. I would suggest ‘cfmo’, which even though it is longer than ‘cfg’, is less generic and not hard to type.

    • cfmo is not bad. OTOH, I may have a hard time pronouncing repeatedly this name during conferences… :-p

  3. Iñigo permalink

    I’m not a naming gurú, but I would like to add some considerations:

    1) Not only existing name conflicts, but an easy tab completion is always nice. I think of cf[tab] is more sure to autocomplete in my systems than co[tab]. Well i don’t have cfengine here 🙂

    2) It does not need to be a “logic” name. as soon as the api and purpose of the program is well known or documented, you can use any name… also a funny, sort and easy to remember, complete, etc name.

    3) Also you can play with abbreviations… in example: “Config Model” => “cm” that fights with “cmp” completion, but for a 3 chars command I don’t see it as a big issue.

  4. gregoa permalink

    thanks for the plan to make it easier to use config-edit; typing all these options is really a bit tedious at the moment 🙂

    as for the name of the script itself; I’m not sure. having something short is of course nice but I’m also wary of something too generic. inf fact I had no problems with `config-edit’ itself, more with the options 🙂

    maybe cme, cmedit, cm-edit? (for cm as in _C_onfig::_M_odel)

  5. Anonymous permalink

    I’d suggest something which evokes the phrase “config model”, not just the word “config”. So: cm, cfm, cmod, confm. All of those seem unlikely to conflict with something else.

  6. sytoka permalink

    cme : Config Model Editor, or just cm

    I just verify, no bin/cme in debian and very few command begin with cm…

    For LaTeX users, cm is synonym of Computer Modern, could only be a good name 😉

    So cmc : Computer Modern Configurator !

  7. Teodor permalink

    I like cfg. Other choices: config, como, cfmo, cfmodel. I prefer ‘cfg’ as short and simple.

    ‘config’ can be a better choice due to the other ‘start/stop’ commands for starting and stopping a service.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: