-
-
Notifications
You must be signed in to change notification settings - Fork 978
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
Make pure.zsh loadable by the prompt system. #14
Conversation
* Now loadable via the prompt system * Used (( )) for numeric comparisons
How did I not know about promptinit. Very nice :)
Can you add an example of this to the install instructions?
Docs too ;)
I'm fine with that if it makes it's easier to use. I've been wanting to support more package managers. |
@@ -0,0 1,16 @@ | |||
# Author: Sindre Sorhus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above:
# Arch package file
or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that's needed. The fact that it's named PKGBUILD
is pretty intention-revealing.
What if I moved it to arch/PKGBUILD
? This would lead naturally to brew/recipe.rb
, debian/whatever-they-do
, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that it's named PKGBUILD is pretty intention-revealing.
Only to Arch users.
What if I moved it to arch/PKGBUILD?
Yes
Side question: Do you know why many prompts include
in their functions? |
I'm not familiar with why these options are needed in prompts. The docs are here if you're interested in some cryptic reading. |
install -Dm644 pure.zsh \ | ||
"$pkgdir/usr/share/zsh/functions/Prompts/prompt_pure_setup" | ||
} | ||
md5sums=('673c5d65495ba6942938925ab4cff2d8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use single quotes on everything for consistency
Awesome, should be good to merge when the readme is updated. |
For example: | ||
|
||
``` | ||
$ sudo cp ./pure.zsh /usr/share/zsh/functions/Prompts/prompt_pure_setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should just rename it so people don't have to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's another change in my more modified fork. I didn't include that here b/c it would've made the PR one all-red file and one all-green file and I figured you'd want to see an actual diff instead. In retrospect, it might've been the wrong choice.
Up to you if you want to rename pre or post merging this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, i don't like how it doesn't allow you to have an extension.
Landed. Thanks so much for these awesome changes. Do let me know if there is anything else that could be improved ;) 🍰 |
Awesome! Thank you for the quick feedback and incorporation. I'll continue to use the prompt and definitely PR any improvements I can make. |
With the code structured like this, pure can be loaded like any other
zsh prompt.
Installation becomes:
$fpath
asprompt_pure_setup
Usage becomes:
It can be listed and previewed too.
I also included an Arch PKGBUILD which installs the prompt. Feel free to
cherry-pick around that if you don't want it -- I can maintain it
separately.
Thanks