8000 Perforce completions by nomaed · Pull Request #3314 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

Perforce completions#3314

Merged
faho merged 9 commits intofish-shell:masterfrom
nomaed:p4-completions
Aug 27, 2016
Merged

Perforce completions#3314
faho merged 9 commits intofish-shell:masterfrom
nomaed:p4-completions

Conversation

@nomaed
Copy link
Contributor
@nomaed nomaed commented Aug 19, 2016

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.

if test -e "$p4info"
return
end
if string match -qr '^Client unknown'
Copy link
Member

Choose a reason for hiding this comment

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

Missing "$p4info".

@faho
Copy link
Member
faho commented Aug 19, 2016

This is already rather complicated (vcsen always are), so it's gonna take me a while to get through it.

@floam
Copy link
Member
floam commented Aug 19, 2016

This isn't as impossible to test as I feared - using the p4 binary without a license you can set P4PORT to public.perforce.com:1666 and play with it. Might help you test it out @faho if you're flying blind.

@nomaed
Copy link
Contributor Author
nomaed commented Aug 19, 2016

@floam I was note aware of the public server. This is great.
I was very frustrated by the need to VPN to our office network to use any command :)

@nomaed nomaed mentioned this pull request Aug 19, 2016
#########################################################

function __fish_p4_is_using_command
set -l cmd $argv[1]
Copy link
Member

Choose a reason for hiding this comment

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

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)

@faho
Copy link
Member
faho commented Aug 22, 2016

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)
@faho faho added this to the next-2.x milestone Aug 23, 2016
@faho
Copy link
Member
faho commented Aug 23, 2016

@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.

@nomaed
Copy link
Contributor Author
nomaed commented Aug 23, 2016

Great. I'll prepare a batch and will put it as a new PR, after the merge

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.

4 participants

0