Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistent argument parsing #5189

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Commits on Jun 16, 2024

  1. Show [--] in -help output

    The current help output of kakoune doesn't mention that a double dash
    (`--`) can be used to separate the files from options.
    PJungkamp committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    385a1ae View commit details
    Browse the repository at this point in the history
  2. Remove --help commandline special case

    This special case was not handled in the `ParametersParser` and
    therefore did not respect the `--` separator for switches.
    PJungkamp committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    7e9c4b7 View commit details
    Browse the repository at this point in the history
  3. Add WithCoord flag to ParameterDesc

    Adding the `WithCoord` flag will make the `ParametersParser` try to
    parse a special `+<line>:<column>` VIM-style switch.
    PJungkamp committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    0cdb088 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. Use WithCoord parameter parsing for argv

    This moves the parameter parsing for the `+<line>:<column>` switch
    of the commandline to the `ParametersParser`. The position switch now
    respects the `--` separator between switches and files.
    
    The manpage does not document the old behaviour of `+:[column]`.
    `+:[column]` works exactly like `+`. This is compatible with the
    previously documented behaviour for `+:`.
    
    The help message is does not mention that omitting the line or column
    moves the cursor to the last line or column. The explanation in the
    manpage should suffice.
    PJungkamp committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    5b888e5 View commit details
    Browse the repository at this point in the history