I noticed that there are Oh My Zsh plugins for baz...
# development
b
I noticed that there are Oh My Zsh plugins for bazel, please, maven, ant, etc. https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins Would you find it helpful to have a Pants plugin for Oh My Zsh? Are there any specific requests for what Oh My Zsh support of Pants would be? Is anyone interested in contributing?
w
Not sure how Bazel does it (or if its commands are static), but we need this on a repo by repo basis - and regenerated based on pants.toml
b
Does it make sense to open a ticket for this separately, or does it fall under #16315 already?
w
16315 is unrelated to ohmyzsh, but relates to completions + pants
b
I wonder if a Oh My Zsh plugin might make a good first issue for someone who feels more confident in their shell scripting skills than in their deep knowledge of Pants internals. Thoughts?
w
🤷 The completions are done, it's just a matter of where to put them right now
b
pantsbuild/pants-completions
...?
w
I should say, where to generate them. There is a discussion of
./pants export
vs something else. I proposed, somewhere, something like
./pants --completions
👍 1
b
Ah. I was literal!
w
I was imprecise 🙂 They have to be generated on pants.toml change, so a static location is kinda meh. They work nice, I've been using them for a few weeks
b
Can't wait to see them in action. Is there anything you need from the team in order to move forward?
w
Just a decision on where they should go.
export
doesn't work at the moment since that's for venvs and such. Otherwise, maybe some opinions on: https://pantsbuild.slack.com/archives/C0D7TNJHL/p1661866801636789 I don't really care where they go - but an idea about whether they should be part of a goal (as a flag or option), or if they can stay separate like the
--completions
idea. I can then go forth and implement
p
I use oh-my-zsh. zsh completions feel a bit more powerful than bash completions - I wonder if the completions could be retrieved on the fly from a running pantsd to provide contextual completions.
Anything that can be passed on the command line is a good candidate for oh-my-zsh integration…
It might be cool to have a symbol in the prompt when pantsd is running.
💯 1
Another really cool integration would be to run
pants
from any directory and have it auto-adjust the args such that it can run pants from the root
./pants
under the covers…
b
Ooh. Open a ticket for the
pantsd
prompt. That's such a straightforward contribution for the right person.
w
It might be cool to have a symbol in the prompt when pantsd is running
Why? Shouldn't it always be running if you're using Pants? Also, this does beg the question - does the daemon ever time out? I just opened activity monitor and saw 5 daemons that have been running for a few days
b
There are some situations where
--no-pantsd
is a valid choice. https://www.pantsbuild.org/docs/contributions-debugging
w
For sure, I just mean in the context of it modifying the prompt
p
I was thinking about how I have git and other details on my prompt like, and was wondering how something like that could be useful for pants. I'm not sure if the utility of something that says pantsd is running other than curiosity and maybe debugging... Why were there so many pantsd instances for you? Multiple projects? Or duplicates in the same project?
w
I like git, because it tells me which branch I'm on - but I find everything else kinda noisy in the ohmyzsh themes. Re: multiple pants instances - good question. I have a lot of projects I've migrated over, but only 2 that I've done anything with in the last week or two. I also noticed that one of them was using my system xcode compiler, and I have NO idea how that happened, since I use a .pants.rc everywhere to ignore that dumpster fire
b
What if the prompt just had a 👖 or 👖 icon to indicate that Pants is setup in the repo, perhaps with a small modifier such as "*" to additionally indicate that pantsd is running? Essentially the way Github's logo being present in the prompt is a reminder that the repo is setup to use GH.
I could see that potentially being useful in codebases where not everyone is aware Pants is included, such as open source. Or possibly a client's repo, @wide-midnight-78598?
w
Oh now that's interesting as a branding/informative hint
🚀 1