diff --git a/docs/plugins/rename.rst b/docs/plugins/rename.rst index 55534e636..0c4bc9ddb 100644 --- a/docs/plugins/rename.rst +++ b/docs/plugins/rename.rst @@ -1,19 +1,30 @@ rename ====== -Allows renaming various things. Use `gui/rename` for an in-game interface. +Tags: +:dfhack-keybind:`rename` -Options: +Easily rename things. Use `gui/rename` for an in-game interface. -``rename squad "name"`` - Rename squad by index to 'name'. -``rename hotkey \"name\"`` - Rename hotkey by index. This allows assigning - longer commands to the DF hotkeys. -``rename unit "nickname"`` - Rename a unit/creature highlighted in the DF user interface. -``rename unit-profession "custom profession"`` - Change proffession name of the highlighted unit/creature. -``rename building "name"`` - Set a custom name for the selected building. - The building must be one of stockpile, workshop, furnace, trap, - siege engine or an activity zone. +Usage: + +``rename squad ""`` + Rename the indicated squad. The ordinal is the number that corresponds to + the list of squads in the squads menu (:kbd:`s`). The first squad is ordinal + ``1``. +``rename hotkey ""`` + Rename the indicated hotkey. The ordinal the the number that corresponds to + the list of hotkeys in the hotkeys menu (:kbd:`H`). The first hotkey is + ordinal ``1``. +``rename unit ""`` + Give the selected unit the given nickname. +``rename unit-profession ""`` + Give the selected unit the given profession name. +``rename building ""`` + Set a custom name to the selected building. The building must be a + stockpile, workshop, furnace, trap, siege engine, or activity zone. + +Example +------- + +``rename squad 1 "The Whiz Bonkers"`` + Rename the first squad to The Whiz Bonkers. diff --git a/plugins/rename.cpp b/plugins/rename.cpp index 0ef3e02d5..7c46fc908 100644 --- a/plugins/rename.cpp +++ b/plugins/rename.cpp @@ -61,16 +61,9 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector \"name\"\n" - " rename hotkey \"name\"\n" - " (identified by ordinal index)\n" - " rename unit \"nickname\"\n" - " rename unit-profession \"custom profession\"\n" - " (a unit must be highlighted in the ui)\n" - " rename building \"nickname\"\n" - " (a building must be highlighted via 'q')\n" - )); + "rename", + "Easily rename things.", + rename)); if (Core::getInstance().isWorldLoaded()) plugin_onstatechange(out, SC_WORLD_LOADED);