Skip to content

the text of a :! command line runs past its end - #152

Merged
Galvarcus merged 1 commit into
Developmentfrom
150-shell-line-end
Nov 15, 2026
Merged

Galvarcus merged 1 commit into
Developmentfrom
150-shell-line-end

Conversation

@Galvarcus

Copy link
Copy Markdown
Owner

The rule of #142 read every word behind a :! as shell text, to the end of the statement. In a mapping, the command line of the shell ends at the <CR> that runs it, and the mapping ends at a bar. In a lambda block, it ends with its line. So :!git pull<CR>:call Missing()<CR>, :!ctags -R .<CR>| call Missing() and a Missing() on a later line of the block marked Missing as a word of Vim, and a call to a function that does not exist was no longer counted.

shell_text now bounds the text: the line of the :!, and in a mapping the tokens before the first key name or bar. A key name such as <Bar> that the shell would read ends the text as well, which leaves a word counted and drops none.

fixes: #150

AI assistance

  • AI involvement is disclosed in the commit message

Checklist

  • The commit message follows the Problem and Solution form above
  • tools/check prints every check passed
  • The Signed-off-by: trailer is present, which the
    prepare-commit-msg hook adds. A fresh checkout has no hooks,
    so install them again before the first commit

Tests

  • Tests were added, and each was watched failing first

the_shell_text_of_a_bang_ends_with_its_command_line in tests/vim9_excmds.rs fails without the change: all three Missing references were marked as Vim's.

What the analyzer reports

  • No finding moves, and every parity fixture matches

The four corpora and the survey report the same as before.

Documentation

  • No documentation update is needed

Anything reviewers should know

The cloud review of Development against main found this fault, which #142 brought in. No release holds #142.

Problem:  The text of a :! command line runs past its end.
Solution: End the shell text of a :! at the end of its line, and in a
          mapping at the first key name or bar (Galvarcus).

The rule of #142 read every word behind a :! as shell text, to the end
of the statement. In a mapping, the command line of the shell ends at
the `<CR>` that runs it, and the mapping ends at a bar. In a lambda
block, it ends with its line. So `:!git pull<CR>:call Missing()<CR>`,
`:!ctags -R .<CR>| call Missing()` and a `Missing()` on a later line of
the block marked `Missing` as a word of Vim, and a call to a function
that does not exist was no longer counted.

shell_text now bounds the text: the line of the :!, and in a mapping the
tokens before the first key name or bar. A key name such as `<Bar>`
that the shell would read ends the text as well, which leaves a word
counted and drops none.

The four corpora and the survey report the same as before.

fixes:   #150
related: #142
related: #140

Assisted-by: Claude Opus 5
Signed-off-by: Galvarcus <117151435+Galvarcus@users.noreply.github.com>
@Galvarcus Galvarcus self-assigned this Nov 15, 2026
@github-actions github-actions Bot added the analyzer Changes the Rust analyzer, the fixtures, or the tools that build them label Nov 15, 2026
@Galvarcus
Galvarcus merged commit 7f19d27 into Development Nov 15, 2026
9 checks passed
@Galvarcus
Galvarcus deleted the 150-shell-line-end branch November 15, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

analyzer Changes the Rust analyzer, the fixtures, or the tools that build them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant