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 commented Jan 24, 2017

Add pv completions (http://www.ivarch.com/programs/pv.shtml).

@moverest moverest force-pushed the pv-completion branch 2 times, most recently from 11fdaa4 to b329ff0 Jan 24, 2017
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

@faho faho Jan 24, 2017

"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

@faho faho Jan 24, 2017

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

@moverest moverest Jan 24, 2017

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

@faho faho Jan 24, 2017

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

@faho faho Jan 24, 2017

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

@moverest moverest commented Jan 24, 2017

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

faho
faho approved these changes Jan 24, 2017
@faho faho merged commit 3e10640 into fish-shell:master Jan 24, 2017
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@faho
Copy link
Member

@faho faho commented Jan 24, 2017

Merged, thanks!

@moverest moverest deleted the pv-completion branch Jan 28, 2017
@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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants