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

Add pv completions #3773

Merged
merged 1 commit into from Jan 24, 2017
Merged

Add pv completions #3773

merged 1 commit into from Jan 24, 2017

Conversation

moverest
Copy link
Contributor

@moverest moverest force-pushed the pv-completion branch 2 times, most recently from 11fdaa4 to b329ff0 Compare January 24, 2017 20:36
complete -x -c pv -l delay-start -s D -d 'Wait given time (in secs) before showing progress'
complete -x -c pv -l size -s s -d 'Set total number of bytes to be transfered'
complete -c pv -l line-mode -s l -d 'Count lines instead of bytes'
complete -c pv -l null -s 0 -d 'Count lines as null terminated'
Copy link
Member

Choose a reason for hiding this comment

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

"Count null-terminated lines"?

complete -c pv -l skip-errors -s E -d 'Ignore read errors'
complete -c pv -l stop-at-size -s S -d 'Stop transfer when reach number of bytes'
complete -x -c pv -l watchfd -s d -d 'Watch file given description from given process (PID:FD)'
complete -x -c pv -l remote -s R -d 'Run as other pv with given PID' -a '(__fish_complete_pids | string match \*\tpv\*)'
Copy link
Member

Choose a reason for hiding this comment

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

This seems a bit confusing. The description from the man page is:

If PID is an instance of pv that is already running, -R PID will cause that instance to act as though it had been given this instance's command line instead. For example, if pv -L 123k is running with process ID 9876, then running pv -R 9876 -L 321k will cause it to start using a rate limit of 321k instead of 123k.

So something like "Change a running pv's options"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed. I've read the man a little too fast while doing other things.

complete -x -c pv -l buffer-size -s B -d 'Use transfer buffer size (in bytes)'
complete -c pv -l no-splice -s C -d 'Don\'t use slice'
complete -c pv -l skip-errors -s E -d 'Ignore read errors'
complete -c pv -l stop-at-size -s S -d 'Stop transfer when reach number of bytes'
Copy link
Member

Choose a reason for hiding this comment

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

Grammar seems off - "Stop transfer after given number of bytes"?

complete -c pv -l average-rate -s a -d 'Show average rate'
complete -c pv -l bytes -s b -d 'Show total byte counter'
complete -c pv -l buffer-percent -s T -d 'Show transfer buffer percentage'
complete -c pv -l last-written -s A -d 'Show last given number of bytes'
Copy link
Member

Choose a reason for hiding this comment

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

The man pages

Show the last NUM bytes written

seems okay.

@faho faho added this to the next-minor milestone Jan 24, 2017
@moverest
Copy link
Contributor Author

I've pushed the changes you wanted. :-)

@faho faho merged commit 3e10640 into fish-shell:master Jan 24, 2017
@faho
Copy link
Member

faho commented Jan 24, 2017

Merged, thanks!

@moverest moverest deleted the pv-completion branch January 28, 2017 20:02
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants