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

zsh completion for tea +pkg #109

Closed
mxcl opened this issue Oct 29, 2022 · 5 comments
Closed

zsh completion for tea +pkg #109

mxcl opened this issue Oct 29, 2022 · 5 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@mxcl
Copy link
Member

mxcl commented Oct 29, 2022

The results can be obtained with:

cd $(tea --prefix)/tea.xyz/var/pantry/projects
find * -name package.yml -type f -exec dirname {} \;
@jhheider
Copy link
Contributor

jhheider commented Nov 12, 2022

My brain thinks this is the same as:

find $(tea --prefix)/tea.xyz/var/pantry/projects -name package.yml -type f -exec dirname {} \; | sed -e "s|$(tea --prefix)/tea.xyz/var/pantry/projects/||"

which replaces the cd with a second invocation of tea and requires sed. Probably not better, but cd can add weirdness. My shell also doesn't know surname (but I'm not using zsh).

@mxcl
Copy link
Member Author

mxcl commented Nov 13, 2022

Provided it operates in a subshell the cd is safe. I prefer doing less and relying on sed with its platform specific quirks seems riskier.

@jhheider
Copy link
Contributor

Yeah, agreed. The final form might be profitably added to the client as tea --completions.

@mxcl
Copy link
Member Author

mxcl commented Jan 18, 2023

This should be added to --magic

@mxcl
Copy link
Member Author

mxcl commented Jun 7, 2023

Closing in lieu of #591

@mxcl mxcl closed this as completed Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants