Maxime Coste
3e797a3d15
centralize bit operation support for enum used as flags
2014-10-23 19:02:39 +01:00
Maxime Coste
2d5c730441
Replace CommandManager::register_command*s* with register_alias
2014-06-06 00:21:12 +01:00
Maxime Coste
8356e44ad5
Improve error reporting when parsing commands
...
*debug* will contain line and column informations along
with the responsible command name.
2014-05-07 20:39:59 +01:00
Maxime Coste
65c818b859
Use StringView in CommandManager
2014-04-21 21:49:25 +01:00
Maxime Coste
20d20ae1dc
formatting changes in command_manager.cc
2014-04-08 19:55:31 +01:00
Maxime Coste
8ac19edf67
Add a docstring to commands
2014-03-02 01:08:11 +00:00
Maxime Coste
9451782648
Add command switches information, and automatically display it
2014-03-02 01:08:11 +00:00
Maxime Coste
7f9f887b4a
All commands now take directly a parameter parser
...
The command parameters description are now stored in a ParameterDesc
structure.
2014-03-02 01:08:11 +00:00
Maxime Coste
e364137196
Fix compilation with clang 3.4
2014-01-27 20:28:38 +00:00
Maxime Coste
37b4eacdc8
Rework command completion to allow partial token completion
...
Implement hook completion.
fixes #44
2014-01-27 19:51:58 +00:00
Maxime Coste
fd17ea00dd
CommandManager: use aliases for commands rather than duplicating data
...
Completion now only proposes full command names
2013-12-24 02:06:22 +00:00
Maxime Coste
0244112af4
Add support for hidden commands, that will not show on completion
2013-11-12 19:38:19 +00:00
Maxime Coste
3e1bb777ce
Add automatic completion display in prompt mode
...
Controlled by the autoshowcompl option
Completers now take a CompletionFlag parameter, used to specify
we want fast completion (tag completion can be slow, we do not
want to run it if not explicitely wanted by the user).
2013-11-04 21:59:28 +00:00
Maxime Coste
af8e8d27d4
Minor code cleanups
2013-07-28 16:40:02 +02:00
Maxime Coste
eedd37c09a
memoryview: always pass by value
2013-07-26 01:50:36 +02:00
Maxime Coste
270e950cf1
sort includes directives
2013-04-09 20:05:40 +02:00
Maxime Coste
0395f3b9fc
fix compilation with clang++
2013-04-03 18:51:40 +02:00
Maxime Coste
73c446e379
code style cleanup in CommandManager
2012-11-22 14:28:14 +01:00
Maxime Coste
9d04c773c1
CommandManager: diagnose unterminated strings
2012-11-21 13:56:52 +01:00
Maxime Coste
6bbbd2543a
move wrong_argument_count to commands.cc, where it is used
2012-11-21 13:44:43 +01:00
Maxime Coste
0ce6bd9bf5
use ByteCount instead of CharCount when we are really counting bytes
...
(that is most of the time when we are not concerned with displaying)
2012-10-11 00:41:48 +02:00
Maxime Coste
ae76b7dddc
Add support for shell script parameters
...
Now %sh{ ... } can access positional parameters through
standard shell construct, allowing simple handling of variable
parameters.
def command accepts -shell-params flag to use this facility.
2012-09-09 17:10:53 +02:00
Maxime Coste
e4fd839dda
use a strongly typed int CharCount for character counts
2012-08-23 23:56:35 +02:00
Maxime Coste
a38a9c3bf2
Commands take a mutable context, main_context is gone !
2012-08-06 22:02:11 +02:00
Maxime Coste
a712dd5bbe
Completions functions take a Context parameter
2012-08-06 21:37:43 +02:00
Maxime Coste
39797f87dc
command_manager: cleanup command execution, lazy exec shell commands
2012-08-06 19:29:51 +02:00
Maxime Coste
2071db3558
Tokens are CommandManager implementation details
...
CommandParameters go back to memoryview<String>
2012-08-01 14:27:34 +02:00
Maxime Coste
36070dd429
CommandManager: rework command parser
...
a new type of strings is supported inspired by the ruby strings.
%<delimiter>content<delimiter>, if opening delimiter is one of
([{<, then closing delimiter is the matching )]}> and balanced
delimiters in the string needs not to be escaped, else the closing
delimiter is the same as the opening one.
shell expansion is available through %sh<delimiter>command<delimiter>
syntax.
Command flags have been removed, as these strings provide proper nesting
support, so now, you can for example do:
def command %{ echo %sh{ ls } }
2012-07-31 14:22:57 +02:00
Maxime Coste
b65f8cc887
CommandParameters is a list of Tokens instead of Strings
...
CommandManager string parsing is less ad-hoc.
2012-07-31 00:06:50 +02:00
Maxime Coste
f972428823
The def command do not override commands by default, use -allow-override
2012-06-02 15:49:35 +00:00
Maxime Coste
96c440fcaa
CommandManager::execute can take an optional EnvVarMap argument which is used for shell evaluation
2012-05-29 05:42:26 +00:00
Maxime Coste
9337938403
replace std::string references with String
2012-04-14 01:17:09 +00:00
Maxime Coste
2c8a6ca56a
Support shell commands
expansion in CommandManager
2012-02-13 21:38:07 +00:00
Maxime Coste
0483e951ad
use memoryview instead of std::vector where applicable
2012-02-03 19:14:35 +00:00
Maxime Coste
f259af9326
CommandManager: add flags support and IgnoreSemiColons flag
...
commands are now registred with flags, and the IgnoreSemiColons
flag permit to specify a command which needs all the parameters
on the line, bypassing the command sequence operator ';'.
the hook command is tagged as such.
2012-01-15 03:02:08 +00:00
Maxime Coste
95db828e17
CommandManager: use directly first command parameter as the command name
2012-01-14 14:02:54 +00:00
Maxime Coste
957446dee4
Add a Context parameter to commands
2011-11-26 18:32:57 +00:00
Maxime Coste
8f70192875
CommandManager: now a singleton
2011-09-23 14:29:42 +00:00
Maxime Coste
63191f1900
CommandManager: support per command configurable completion
2011-09-16 09:18:51 +00:00
Maxime Coste
b59ad6a174
Completion: dedicated completion header and basic filename completion
2011-09-14 15:41:56 +00:00
Maxime Coste
eecc5a184e
CommandManager: basic command name completion support
2011-09-13 21:16:48 +00:00
Maxime Coste
3caf962110
exception: refactoring
2011-09-09 18:40:59 +00:00
Maxime Coste
03f1520b43
Refactor commands handling and parsing in a CommandManager class
2011-09-07 18:16:56 +00:00