Comments (10)
What about prefixing the help string with a group name? Something like:
[RegisterCommand("cube.move", Help = "cube/Move test cube")]
static void CommandMove(CommandArg[] args) { }
[RegisterCommand("cube.rotate", Help = "cube/Rotate test cube")]
static void CommandRotate(CommandArg[] args) { }
Then calling the help
command would only show "cube", and calling help cube
would list all commands in the group.
That way this is only a documentation thing, and doesn't affect how commands are processed internally. Allowing it to be an optional feature.
Either way I think you make a valid point, my projects use enough commands that the help
command isn't super useful, and I find my self using help command_name
most of the time. Having groups would likely make the command documentation more organized and easier to navigate.
from command_terminal.
That would work, especially with new autocomplete
from command_terminal.
I've added this functionality to the help
command. Example using ed
as a group:
from command_terminal.
How about adding option not to create a help menu for command?
For example I have 3 objects and every object creates command with name "{name}.jump" and I don't want to show any of this groups in help menu?
from command_terminal.
So just a way to not show the command at all?
Also, why create a jump command for each object instead of having a single jump command that receives an identifier like jump {name}
?
from command_terminal.
Because I don't need to create one object to hold all objects with jump command, instead every object can add it's own command, and autocomplete supports it.
When I think of it I can create static class to store objects which is good but there is still no autocomplete support.
from command_terminal.
Ah that makes sense, the groups would allow you to group all {name}
objects together or all jump
commands together. Why would you want to hide everything?
Something like:
[RegisterCommand("cube1.jump", Help = "jump/Cube1 jump")]
static void CommandJump1(CommandArg[] args) { }
[RegisterCommand("cube2.jump", Help = "jump/Cube2 jump")]
static void CommandJump2(CommandArg[] args) { }
would only show jump
(not the individual cube.jump commands) in the help list, to see both commands you would use help jump
.
By the way, you can add things to the autocomplete with Terminal.Autocomplete.Register("name")
. But I get what you're saying, you want separate commands.
from command_terminal.
Making command structure like {object}.{group}.{command} is just more logical to me.
equipment.gear.add helmet
is more logical to me than add equipment gear helmet
or equipment_add gear helmet
from command_terminal.
But after some thought jump {name}
might be more logical
from command_terminal.
I've added this functionality to the
help
command. Example usinged
as a group:
Excuse me, is this already available?
from command_terminal.
Related Issues (20)
- Mobile Device Support? HOT 7
- Parameters usability HOT 2
- unclear
- AddCommand don't add autocompletion all the times HOT 3
- Deleting commands? HOT 4
- never assigned to warnings
- CVARS feature? HOT 1
- move cursor at end not working when pressing UP key HOT 1
- Static methods not called if asset is in the /Plugins/ folder HOT 2
- BUG Background isn't rendered. (workaround) HOT 2
- in webgl all commands have command prefix in runtime
- Terminal background is transparent
- How to make command group? HOT 1
- Is there a way to avoid displaying the Debug.Log? HOT 1
- Typing is not showing up HOT 1
- Binding hotkey to F1-F12 doesn't register first letter in input HOT 2
- Can you updates to Input System supports?
- Command usage tip? HOT 4
- Readme suggestions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from command_terminal.