Skip to content

Make aliases useful for deprecating commands #3342

@myk002

Description

@myk002

The current alias system is intended to allow a player to make a shorter version of a frequently used command and/or parameter list. However, aliases have recently begun to be used as a way to allow an old name for a renamed/deprecated tool to function. The idea is that players who are used to typing the old name will still be able to do so, and renamed tools that can be enabled will still be enableable via their old name.

Aliases, however, are not well integrated into the rest of the system and do not really provide players and script writers with a good overall experience when they are used to make deprecated names "still available". Here are some ideas for improving the player experience for aliases:

  • show appropriate help in gui/launcher when the alias is in the commandline. It would also be useful to prepend the help text with the alias expansion so the player can see exactly what they will be running, though this is not required if it ends up being too difficult.
  • possibly already covered by the gui/launcher item, helpdb should display useful help text if an alias is given as an entry (this will allow help text to appear in the hotkeys logo popup menu if an alias is given a hotkey, for example). document that players should poke helpdb to reindex after modifying aliases (we probably don't want to do this automatically since aliases tend to be updated in batches (i.e. in init files) and we already reindex on world load/unload)
  • allow reqscript to find the correct script if an alias is named (e.g. reqscript('unforbid') would redirect to reqscript('claim'))
  • allow require to find the correct module if an alias is named (e.g. require('plugins.oldname') would redirect to require('plugins.newname'))

Edit: I think the ROI on those last two might be insufficient to warrant implementation.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions