Skip to content

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Jan 27, 2024

  • The POD text lied because the code was not compatible with OpenBSD
  • Make head consistent with tail by accepting the historic -NUM form as -n NUM
  • While here, correct the name of helper function: s/tail_fh/head_fh/
%perl head -2 head
#!/usr/bin/perl

%perl head -n 2 head
#!/usr/bin/perl

%perl tail -2 tail
=cut

%perl tail -n 2 tail
=cut

* The POD text lied because the code was not compatible with OpenBSD
* Make head consistent with tail by accepting the historic -NUM form as -n NUM
* While here, correct the name of helper function: s/tail_fh/head_fh/

%perl head -2 head
#!/usr/bin/perl

%perl head -n 2 head
#!/usr/bin/perl

%perl tail -2 tail
=cut

%perl tail -n 2 tail
=cut
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: head The head program labels Jan 27, 2024
@mknos mknos changed the title head: support -NUM WIP: head: support -NUM Jan 27, 2024
@mknos mknos changed the title WIP: head: support -NUM head: support -NUM Jan 27, 2024
@briandfoy briandfoy self-assigned this Jan 28, 2024
Copy link
Owner

@briandfoy briandfoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh, tail_fh. It's okay to have separate pull requests, but I think many of the changes for these two programs have been the same and you could combine them in one PR. Either way is fine with me.

@briandfoy briandfoy merged commit 2906a76 into briandfoy:master Jan 28, 2024
@briandfoy briandfoy added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels Jan 28, 2024
@briandfoy
Copy link
Owner

changes: handle - option to be like -n

@briandfoy briandfoy added Status: released there is a new release with this fix and removed Status: accepted The fix is accepted labels Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: head The head 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