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

ed: inferred range commands #624

Merged
merged 1 commit into from
May 28, 2024
Merged

Conversation

mknos
Copy link
Contributor

@mknos mknos commented May 28, 2024

  • Line addresses can be inferred when entering a range with a comma
  • An explicit range has two addresses, e.g. "1,2" or "4,$"
  • If first address is not given it is always 1
  • If first and last address are both not given, last address is $ (last valid line address)
  • I discovered this when testing against OpenBSD and GNU ed
  • test1: ",n" --> interpret as 1,$n
  • test2: ",5n" --> interpret as 1,5n

* Line addresses can be inferred when entering a range with a comma
* An explicit range has two addresses, e.g. "1,2" or "4,$"
* If first address is not given it is always 1
* If last address is not given it is $ (last valid line address)
* I discovered this when testing against OpenBSD and GNU ed
* test1: ",n" --> interpret as 1,$n
* test2: ",5n" --> interpret as 1,5n
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: ed The ed program labels May 28, 2024
@briandfoy
Copy link
Owner

changes: commands can use inferred line ranges when you omit the first or last value in n,m

@briandfoy briandfoy self-assigned this May 28, 2024
@briandfoy briandfoy merged commit 2ba6936 into briandfoy:master May 28, 2024
2 checks passed
@briandfoy briandfoy added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels May 28, 2024
@briandfoy briandfoy added Status: released there is a new release with this fix and removed Status: accepted The fix is accepted labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: ed The ed program Status: released there is a new release with this fix Type: enhancement improve a feature that already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants