summaryrefslogtreecommitdiff
path: root/src/command_manager.cc
AgeCommit message (Collapse)Author
2018-05-26Rework `fail` command not to display command call stackMaxime Coste
`fail` triggers "expected" errors, and hence should just display the provided message.
2018-05-26Do not expose C++ typeid().name to user facing errors on wrong option typeMaxime Coste
Fixes #2079
2018-04-06Make error messages more consistentDelapouite
2018-03-27Simplify command debug codeMaxime Coste
2018-03-18Fix crash on expanding command line stringsMaxime Coste
2018-03-13ranges: Add transform overload taking directly a pointer to memberMaxime Coste
This overload will forward to the general transform implementation using std::mem_fn to generate a callable.
2018-02-20Re-introduce aliases in command name completionMaxime Coste
Aliases are considered again in command name completion, but only if they are more than 3 charactes long. This should prevent cluttering with aliases while still letting long ones being completed.
2018-02-19Fix bug in command parsing post refactoringMaxime Coste
Fixes #1857
2018-02-18CommandManager: unescape % while parsing the stringMaxime Coste
2018-02-15CommandManager: refactor parsing of commands to iterate through tokensMaxime Coste
Avoid storing a big vector of tokens, read them one by one, and store only the current command.
2018-02-09CommandManager: Use byte rather than columns for token positionsMaxime Coste
Not only are display columns rarely used to give error positions, but they make the parsing much slower as for each token we need to compute the column in the line.
2018-02-06Fix parsing of percent tokens with unicode separatorsMaxime Coste
2018-02-04CommandManager: parse command lines as utf8 instead of asciiMaxime Coste
Fixes #1829
2017-11-04CommandManager: tweak namingMaxime Coste
2017-10-17Optimize CommandManager::execute handling of tokensMaxime Coste
Instead of walking a list of tokens and inserting eventual new ones in the middle, use a stack of token and push new ones on top.
2017-09-01Make Token a simple aggregateMaxime Coste
2017-08-29Rename containers.hh to ranges.hh (and Container to Range)Maxime Coste
2017-06-29Remove some dead codeMaxime Coste
2017-06-17src: Add a `commands` debug flagFrank LENORMAND
This commit allows setting the `commands` flag to the `debug` option, in order to have the engine write on the *debug* buffer the commands that are being executed, along with their arguments.
2017-06-07Remove unneeded unknown_expand exception typeMaxime Coste
2017-06-07Do not allow whitespaces as % string delimitersMaxime Coste
2017-06-04Improve readability of command docstrings by changing formattingMaxime Coste
Fixes #1378
2017-05-25Fix command parsing bug when commenting after a commandMaxime Coste
When a comment was present directly on the same line after a command, we did not correctly see the command as terminated and would join continue parsing the next line.
2017-05-08Do not push a final spurious command separators when parsing commandsMaxime Coste
Fixes #1336
2017-05-07Fix use of invalidated iterator in the command map on exceptionMaxime Coste
The command map can get mutated by command execution, so the iterators can get invalidated (now that we use our curstom HashMap implementation, all iterators are potentially invalidated by insert/removal)
2017-04-19Safer code for parsing commandsMaxime Coste
Fix some possible past the end of target string reads Fixes #1310 (maybe, probably, who knows)
2017-04-10Remove some now unneeded uses of const String& paramsMaxime Coste
HashMap supports finding String from StringView.
2017-03-16Fixes some clang-tidy warning and add a few missing meta.hh includeMaxime Coste
2017-03-15Small code tweaks regarding flags handlingMaxime Coste
2017-03-07Replace uses of UnorderedMap with HashMapMaxime Coste
2017-01-29Detect too deep command call stackMaxime Coste
Fixes #1163
2017-01-29Make StringView and unit types trivial typesMaxime Coste
2017-01-08Small code cleanupsMaxime Coste
2017-01-08Apply clang-tidy modernize to the codebaseMaxime Coste
2016-12-27Merge remote-tracking branch 'leira/empty_param_crash'Maxime Coste
2016-12-24Added string length check when checking switch paramsLeira Hua
Fixes #1051
2016-12-23Display the command prompt in error face when the command is not foundMaxime Coste
Fixes #1021
2016-12-07Ensure content of expanded strings in modelinefmt is not interpreted as markupMaxime Coste
2016-12-07Small command parsing refactoringMaxime Coste
2016-11-20Make ArrayView::subrange size arguement optionalMaxime Coste
2016-11-14Do not include aliases in command completion candidates anymoreMaxime Coste
Fuzzy matching makes it redundant. Closes #817
2016-10-10Convert some uses of lambda to more concise std::mem_fnMaxime Coste
2016-10-01Support codepoints of variable widthMaxime Coste
Add a ColumnCount type and use it in place of CharCount whenever more appropriate, take column size of codepoints into account for vertical movements and docstring wrapping. Fixes #811
2016-09-18Rewrite PerArgumentCommandCompleter to use compile time dispatchingMaxime Coste
No need to store these vectors of std::functions around anymore.
2016-08-05Regenerate shell-candidates for each completion sessionsMaxime Coste
That should allow fixing the #665 issue while still avoiding to run a potentially long shell command on each keystroke.
2016-06-19Trim trailing end of lines in %sh outputsMaxime Coste
Fixes #698
2016-04-17Add support for env var name completionMaxime Coste
Fixes #659
2016-03-24Add completion support for alias/unalias commandsMaxime Coste
2016-03-08Rework container helpers, use pipe syntax and cleanup implementationMaxime Coste
use 'container | filter(func) | reverse() | transform(func)' instead of 'transform(reverse(filter(container), func), func)' to express container transformations.
2016-03-08Use ranked match based completion for command namesMaxime Coste