summaryrefslogtreecommitdiff
path: root/src/parameters_parser.hh
AgeCommit message (Collapse)Author
2024-10-22Remove now unused CompletionFlagsMaxime Coste
Since shell-script-completions now runs the script asynchronously and unconditionally, there is no use for the CompletionFlags::Fast anymore which means we can remove that type altogether.
2024-08-16include headers cleanupAdriĆ  Arrufat
2024-08-12Extract format implementation to its own fileMaxime Coste
Split it to avoid pulling all string_utils dependencies for just format.
2023-10-25Remove redundant comparison operatorsMaxime Coste
Since C++20 (a != b) get automatically rewritten as !(a == b) if the != operator does not exist.
2023-02-17Complete arguments to "echo -to-file"Johannes Altmanninger
Including this here because grandparent parent commit broke completions for "edit -fifo".
2023-02-17Use parameter parser to skip switch args in completionJohannes Altmanninger
The command line "hook -group xyz " should get scope completions but it actually gets hook completions because "xyz" is wrongly interpreted as positional argument. Fix this by using the parameters parser to compute positional arguments. Fixes #4840
2022-05-21Stop using deprecated std::iteratorJohannes Altmanninger
As reported in #4615 and others, GCC 12.1 emits deprecation warnings because we use std::iterator. Replace it with the modern equivalent. Closes #4615
2019-05-10Do not keep a reference to ParametersDesc inside ParameterParserMaxime Coste
This should fix #2900
2018-07-05Parse unknown switches as positional for region highlightersMaxime Coste
2018-07-05Fix ParameterParser::position_from with arbitrary indicesMaxime Coste
2018-07-05Change option lists to be specified as separate arguments on commands lineMaxime Coste
Option lists and maps are specified using separate arguments, avoiding the need for additional escaping of their separator and reusing the existing command line spliting logic instead. As discussed on #2087, this should make it much easier to work with list options, and make the general option system feel cleaner.
2017-10-10Move all non-core string code to string_utils.{hh,cc}Maxime Coste
2017-09-01Remove unneeded ParameterDesc constructorMaxime Coste
With C++14, we can use aggregate initialization and default values together.
2017-03-15Small code tweaks regarding flags handlingMaxime Coste
2017-03-15Migrate WithBitOps template specialization to with_bit_ops functionMaxime Coste
This way we dont depend on knowing the base template to enable bit ops on an enum type.
2017-03-07Replace IdMap with HashMapMaxime Coste
2015-06-01Port even more code to use format functionMaxime Coste
2015-03-14Change ParameterParser switch interface, use an Optional<StringView>Maxime Coste
Merge has_option and option_value into a single method get_switch.
2015-03-12Cleanup parameter parser codeMaxime Coste
2015-03-09ArrayView content is not const anymoreMaxime Coste
As in upcoming std c++ array_view, ArrayView<T> points to mutable data, use ArrayView<const T> or alias ConstArrayView<T> for const data.
2015-01-12Yet more trackingMaxime Coste
2015-01-06Rename memoryview to ArrayViewMaxime Coste
2014-12-23Remove trailing blank linesMaxime Coste
2014-12-23Rename id_map to IdMapMaxime Coste
2014-10-23centralize bit operation support for enum used as flagsMaxime Coste
2014-10-20Port more code to StringView instead of const String&Maxime Coste
2014-06-12add postfix increment to ParameterParser iteratorMaxime Coste
2014-06-06Use a id_map implementation for SwitchMapMaxime Coste
That way parameter definition order is respected when writing command doc strings.
2014-03-20Fix support for switches style option in user commandsMaxime Coste
2014-03-02Consistently name -foo things 'switches'Maxime Coste
2014-03-02Add command switches information, and automatically display itMaxime Coste
2014-03-02All commands now take directly a parameter parserMaxime Coste
The command parameters description are now stored in a ParameterDesc structure.
2014-01-23Catch parameter errors on startup and display option informationsMaxime Coste
2014-01-09Style changes, replace typedefs with usingsMaxime Coste
2013-04-09sort includes directivesMaxime Coste
2013-04-09rename assert to kak_assert to avoid collisionsMaxime Coste
2013-04-03fix compilation with clang++Maxime Coste
2013-04-02ParameterParser takes flagsMaxime Coste
Only implemented flag is OptionsOnlyAtStart which considers options given after the first positional parameter as a positional one
2013-03-27Move parameter count validation to the ParameterParserMaxime Coste
2013-02-27ParameterParser: refactoring, simplifyMaxime Coste
2012-12-07extract ParametersParser to it's own fileMaxime Coste