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

bugfix: correct helper setup docs for bash and zsh #593

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TraceyC77
Copy link
Contributor

Description

Fix instructions for zsh and bash so helper functions work Add note that people with custom zsh configs need to adapt instructions Add example of what zshrc should contain

Fixes #576

Testing

Verified solus helper commands can be run in a new shell session for both bash and zsh
For zsh, also created a test file in ~/.zshrc.d and verified it was able to be run without specifying the path

Fix instructions for zsh and bash so helper functions work
Add note that people with custom zsh configs need to adapt instructions
Add example of what zshrc should contain

Fixes #576
@TraceyC77 TraceyC77 requested a review from EbonJaeger December 28, 2024 03:00
Copy link
Member

@EbonJaeger EbonJaeger left a comment

Choose a reason for hiding this comment

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

The ZSH instructions still do not work. To get it to work before, I had an extra line in my .zshrc, I think given to me by @Staudey:

source "$HOME/.zshrc.d/solus-monorepo-helpers.zsh"

It went after autoload -U $HOME/.zshrc.d/*. Whether or not that is the correct way to do things, I have no idea.

@Staudey
Copy link
Member

Staudey commented Dec 29, 2024

Yeah, I have two workarounds for this noted in my .zshrc

Either

for file in $HOME/.zshrc.d/*.zsh; do
    . "$file"
done

Or

autoload -Uz solus-monorepo-helpers.zsh
solus-monorepo-helpers.zsh

But as expected with the new instructions a simple

solus-monorepo-helpers.zsh

added to .zshrc also works. But the state right after following the instructions doesn't.

@TraceyC77 TraceyC77 requested a review from EbonJaeger December 31, 2024 23:44
@TraceyC77
Copy link
Contributor Author

Thanks for the feedback. After some reading, it is indeed necessary to source the helper script in .zshrc since it's not a file with just one function, but a script.

I also changed the setup command a bit to make it easier to read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

ZSH packaging helper instructions don't work
3 participants