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: w command should not update current filename #925

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Jan 20, 2025

  • When writing a file, w command takes an optional filename argument
  • If no filename argument is provided, the "current" filename is used
  • If a filename argument is provided, write to that file but don't update the current filename
  • Found when testing against GNU and OpenBSD versions
  • NB: OpenBSD version calls get_filename() with Save param set to false
%perl ed -p 'PROMPT...' # f command still shows original a.s after write to b.s
PROMPT...e a.s
839
PROMPT...f
a.s
PROMPT...w b.s
839
PROMPT...f
a.s
PROMPT...q

* When writing a file, w command takes an optional filename argument
* If no filename argument is provided, the "current" filename is used
* If a filename argument is provided, write to that file but don't update the current filename
* Found when testing against GNU and OpenBSD versions
* NB: OpenBSD version calls get_filename() with Save param set to false
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@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 Jan 20, 2025
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:41 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 20, 2025 08:42 — with GitHub Actions Inactive
@coveralls
Copy link

coveralls commented Jan 20, 2025

Pull Request Test Coverage Report for Build 12864113029

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 73.389%

Totals Coverage Status
Change from base Build 12861516021: -0.7%
Covered Lines: 353
Relevant Lines: 481

💛 - Coveralls

@briandfoy briandfoy self-assigned this Jan 20, 2025
@briandfoy
Copy link
Owner

changes: w command should not update current filename

@briandfoy briandfoy merged commit c29470d into briandfoy:master Jan 20, 2025
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: low get to this whenever Program: ed The ed program Type: enhancement improve a feature that already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants