MeatROme | 2007-08-05 00:16
Command TAB-Completion
70
points ]
 (8 votes)
complete the _argument_ of (selected) commands with TAB

For all us console-junkies out there ...
... ever wished you could TAB-complete "yellowarmour" for a "newent yellowarmour" ??? ... now you can! :)

To install simply unpack this into your sauerbraten folder and add
exec cmdcomplete.cfg
to your autoexec.cfg.

The given setup gives you TAB-completion on "newent", "entfind", "connect" and "showgui";
so if you have e.g. a favourite server you often connect to you just need to add a 0-byte file to data/complete for it; say it's address is server.sauer.rok then the file should be called server.sauer.rok.srv, if it's a static IP ... like - for example - 123.123.123.123 then the file would be 123.123.123.123.srv ... you get the picture!?!
Likewise for menus you regularly open - extension "gui" in that case.

If you would like other commands to auto-complete too, then simply add them to the cmdcomplete.cfg using the scheme of those already there - just pick an existing ending (if appropriate) or select a new one for yourself - anything remotely useful for the community will be gladly added to this package (of course with attribution to the contributor) - just drop me a line!

Enjoy!

Glyphosate built his scripting version of what AssaultCube does internally (using XML data files) - he provides us with an online help.
Nice work ... and an excellent example of the usage of cmdcomplete (even if I say so myself)!
So check out Generic Console Help.
To use it simply add these two lines to cmdcomplete.cfg after unpacking his ZIP:

cmdcomplete h hlp
cmdcomplete hs hlp

Then you can call anything from /h alias to /h while for your online help pleasure.

cmdTAB.zip (5.49 KB)
70
points
 (8 votes)
User login
29
points ]
 (3 votes)
Created 2012-02-04 09:29
1 day 5 hours ago
Created 2012-01-07 16:21
4 weeks 22 hours ago
10
points ]
 (1 vote)
Created 2012-02-04 21:45
17 hours 28 min ago
Greaserpirate
20
points ]
 (3 votes)
Created 2012-01-25 03:18
1 week 4 days ago
15
points ]
 (2 votes)
Created 2011-10-22 17:57
15 weeks 21 hours ago
13
points ]
 (4 votes)
Created 2012-01-15 14:45
3 weeks 29 min ago
Created 2012-02-02 12:37
3 days 2 hours ago
14
points ]
 (2 votes)
Created 2012-02-01 01:19
4 days 13 hours ago
Created 2012-01-25 00:02
1 week 4 days ago
Chaos
Created 2012-02-02 01:28
3 days 13 hours ago
Created 2012-01-27 20:51
1 week 1 day ago
lopsie4
23
points ]
 (4 votes)
Created 2012-01-25 09:15
1 week 4 days ago
Z3R0N1C
9
points ]
 (2 votes)
Created 2012-01-30 13:01
6 days 2 hours ago
64
points ]
 (7 votes)
Created 2011-09-26 19:58
18 weeks 5 days ago
36
points ]
 (6 votes)
Created 2012-01-04 15:52
4 weeks 3 days ago
10
points ]
 (1 vote)
Created 2011-11-01 14:28
13 weeks 5 days ago
112
points ]
 (14 votes)
Created 2009-04-24 17:50
2 years 40 weeks ago
166
points ]
 (20 votes)
Created 2011-01-08 09:10
1 year 4 weeks ago
19
points ]
 (3 votes)
Created 2011-06-14 20:28
33 weeks 4 days ago
22
points ]
 (3 votes)
Created 2011-07-19 23:58
28 weeks 4 days ago
Users on Quadropolis
9 guests & 1 user online