[Opensim-dev] Organization and naming patterns of commands on the console
Justin Clark-Casey
jjustincc at googlemail.com
Thu Feb 5 17:13:55 UTC 2009
krtaylor wrote:
> Justin, I like this idea - it also greatly simplifies the initial help,
> which can simply refer the user to the sub command helps - e.g. user
> help These new sub command helps can then be much more lengthy if need
> be...
Yes, in fact providing better command line help (at least for the archiving stuff initially) is my immediate driver for
this.
Of course, what we ultimately need is a separate console program for executing commands, in the same manner that
database packages have these command line programs for administering different databases. I know someone/people were
working on that a while back. However, as far as I can see there are currently lots of little awkwardnesses in OpenSim
that prevent this being easily done at the moment (though I hope these will ease with time).
>
> Justin Clark-Casey wrote:
>> Hello,
>>
>> I want to add more commands to the archiving module but I want to do this within the module itself rather than adding
>> any specific logic to core.
>>
>> The terrain module already has a 'module commander' to help do this, but this prefixes all commands with the word
>> terrain (e.g. terrain fill, terrain load, etc.)
>>
>> For consistency purposes, eventually I think that all console commands should largely follow the same pattern. If we
>> the terrain module scheme, then we get the following kinds of changes (if we assume that commands from different modules
>> can actually share the same initial 'keyword')
>>
>> backup => region backup
>> create user => user create
>> create-region => region create
>> help users => user help (for user commands)
>> show assets => assets show
>> show users => user show
>> load-xml => region xml load (?)
>> load-oar => region oar load (?)
>> kickuser => user kick
>>
>> I think that the pros of this approach are that it makes it easy to avoid name collisions and easy to distribute
>> commands to the right module. The console seem to include the fact that it's not very intuitive (e.g. show users seems
>> easier to remember than user show) and it involves more typing in some cases (e.g. region xml load rather than load-xml
>> or load xml).
>>
>> Any thoughts on this? Just kind of thinking about it at this stage - part of me prefers typing things like "show users"
>> or "help terrain" while another part of my mind likes the 'tidiness' of prefixing every module command with the same
>> word (e.g. terrain fill or region oar load).
>>
--
justincc
Justin Clark-Casey
http://justincc.wordpress.com
More information about the Opensim-dev
mailing list