Perforce completions#3314
Conversation
share/completions/p4.fish
Outdated
| if test -e "$p4info" | ||
| return | ||
| end | ||
| if string match -qr '^Client unknown' |
|
This is already rather complicated (vcsen always are), so it's gonna take me a while to get through it. |
|
This isn't as impossible to test as I feared - using the p4 binary without a license you can set P4PORT to |
|
@floam I was note aware of the public server. This is great. |
share/completions/p4.fish
Outdated
| ######################################################### | ||
|
|
||
| function __fish_p4_is_using_command | ||
| set -l cmd $argv[1] |
There was a problem hiding this comment.
This function can be rewritten as contains -- "$argv[1]" (commandline -opc).
(Though what would be needed to properly model what p4 expects would probably be much more complicated, so keeping it as a function should be okay, so you can later expand it)
|
Okay, a few minor nits, otherwise it's looking good. Now I'll install p4 and actually try to use this. |
Fixed per comments in review by @faho, Added -d for all functions, Renamed ”subcommand" term to “command” (so there’s probably diff noise)
|
@nomaed: I'll merge this weekend, so if we make a release on the 30th it's in. If you wish to add to it, I'll continue reviewing, though you can always submit new PRs. |
|
Great. I'll prepare a batch and will put it as a new PR, after the merge |
p4 CLI tool completions.
There are completions for all of the top level commands, but only part of the sub-commands are currently implemented, so the support is not complete yet.
Additional sub-commands completions will be pushed by batches.