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

Perforce completions #3314

Merged
merged 9 commits into from Aug 27, 2016
Merged

Perforce completions #3314

merged 9 commits into from Aug 27, 2016

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

@faho faho Aug 19, 2016

Missing "$p4info".

@faho
Copy link
Member

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

@faho faho Aug 22, 2016

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 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 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 nomaed commented Aug 23, 2016

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

@faho faho merged commit 5328d6b into fish-shell:master Aug 27, 2016
1 check passed
@faho
Copy link
Member

@faho faho commented Aug 27, 2016

Merged, thanks!

@nomaed nomaed deleted the p4-completions branch Aug 27, 2016
@krader1961 krader1961 added this to the fish 2.4.0 milestone Sep 3, 2016
@krader1961 krader1961 removed this from the next-2.x milestone Sep 3, 2016
nomaed added a commit to nomaed/fish-shell that referenced this issue Jul 17, 2017
* completions/p4.fish

* Updated per comments + added p4 clients

* p4 completions: integ, opened, reopen. "default" CL support.

* Perforce RCS -> SCM

* p4 reopen: list opened files

* Fixed per review, added -d for all functions

Fixed per comments in review by @faho,
Added -d for all functions,
Renamed ”subcommand" term to “command” (so there’s probably diff noise)

* p4 completions with submit list of files

* p4 completions for submit: lists open files
@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

4 participants