DaemonEngine / Daemon

The Dæmon game engine. With some bits of ioq3 and XreaL.
https://unvanquished.net
BSD 3-Clause "New" or "Revised" License
298 stars 61 forks source link

cvar autocompletion and cvar printing do not print the same things #593

Open illwieckz opened 2 years ago

illwieckz commented 2 years ago
/sv_master [tab]
   sv_master1 cvar - "master.unvanquished.net" - text - address of a master server 
   sv_master2 cvar - "master2.unvanquished.net" - text - address of a master server 
   sv_master3 cvar - "" - text - address of a master server 
   sv_master4 cvar - "" - text - address of a master server 
   sv_master5 cvar - "" - text - address of a master server 
/sv_master1  
"sv_master1" - text - address of a master server - default: "master.unvanquished.net"
slipher commented 2 years ago

/sv_master [tab] is doing a command completion. The word cvar is there to distinguish it from other types of commands.

In the event of /<cvar name> it's assumed that the user is intentionally running a cvar command so there is no need to indicate that.

illwieckz commented 2 years ago

The cvar prefix was not really a concern, it was more about cvar value not being printed (assumed to be fixed by #594).

But this also reveals different code is used for those two things, while may be we can refactor this?