Daemon
Daemon copied to clipboard
Namespace aware autocompletion. Resolves DaemonEngine/Daemon#449
Some example of how autocompletion behaves with this patch (↹ is shown where I pressed tab):
]se↹
-> /se
server.{x4}
set sets the value of a cvar
seta sets the value of a cvar and marks the cvar as archived
sets sets the value of a cvar
setu sets the value of a cvar
]ser↹
-> /server.
server.challenge.{x3}
server.private cvar - "3" - server private - Controls how much the server advertises: 0 - Advertise everything, 1 - Don't advertise but reply to status queries, 2 - Don't reply to status queries but accept connections, 3 - Only accept LAN connections.
]server.c↹
-> /server.challenge.
server.challenge.count cvar - "1024" - uint - Maximum number of active challenges kept in memory - between 1 and 115292150460684697
server.challenge.length cvar - "8" - uint - Length in bytes of the challenge data (The hexadecimal representation will be twice as long) - between 1 and 9223372036854775807
server.challenge.timeout cvar - "5" - int - Timeout (in seconds) of a challenge - between 1 and 2147483647
]a↹
-> /a
alias creates or view an alias
arg_all ""
arg_count "0"
]/set a.a 1
]a↹
-> /a
a.a "1"
alias creates or view an alias
arg_all ""
arg_count "0"
]/set a.b 1
]a↹
-> /a
a.{x2}
alias creates or view an alias
arg_all ""
arg_count "0"
]a.↹
-> /a.
a.a "1"
a.b "1"
]log↹
-> /logs.
logs.logFile.{x4}
logs.logLevel.{x8}
logs.suppression.{x4}
]/set b.b.b.b.0
]/set b.b.b.b.1
]b.↹
-> /b.b.b.b.
b.b.b.b.0 ""
b.b.b.b.1 ""
This logic should probably go in the CompleteCommandNames function
What if we treated _ the same way as .? Then it would also work with cvars having Quake naming conventions such as r_fullscreen.
What if we treated
_the same way as.? Then it would also work with cvars having Quake naming conventions such asr_fullscreen.
That sounds good!
gentle bump
Are the 2 remarks here blocking? Talking about those:
This logic should probably go in the CompleteCommandNames function
What if we treated _ the same way as .? Then it would also work with cvars having Quake naming conventions such as r_fullscreen.
Done in #723.