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

Update zsh prompt #30

Merged
merged 1 commit into from
Apr 4, 2016
Merged

Update zsh prompt #30

merged 1 commit into from
Apr 4, 2016

Conversation

adarsh
Copy link
Owner

@adarsh adarsh commented Apr 4, 2016

Reason for Change

Changes

  • Extract prompt stuff into a /zsh directory.
  • Add a prompt.zsh file to encapsulate that work in one file.
  • Move everything from zlogin into zshrc.
  • Add some nice functions for colors, padding, etc to make the script code reusable.
  • Add a git status symbol to the prompt to indicate staged/clean/dirty.
  • Set the git branch status in /tmp in a fancy way to avoid rerunning repeatedly.

Minor

  • Remove auto-pairs plugin, it's super irritating, I've decided.

Attribution

BIG thanks to @gabebw for
this zsh prompt makeover.

This is all built on top of
his dotfiles with no innovation.

Follow his dotfiles here: https://github.com/gabebw/dotfiles

@adarsh
Copy link
Owner Author

adarsh commented Apr 4, 2016

@gabebw I believe this is good, since we did it together, but a second glance would be appreciated.

@adarsh
Copy link
Owner Author

adarsh commented Apr 4, 2016

image

git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null)

if [[ -n $ref ]]; then
Copy link

Choose a reason for hiding this comment

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

I'd quote $ref: if [[ -n "$ref" ]]

More here, under "quote all the freaking time": https://robots.thoughtbot.com/the-unix-shells-humble-if#the--command

@gabebw
Copy link

gabebw commented Apr 4, 2016

😍 😍 😍

One comment, then looks good.

Reason for Change
=================

Changes
=======
* Extract prompt stuff into a `/zsh` directory.
* Add a `prompt.zsh` file to encapsulate that work in one file.
* Move everything from `zlogin` into `zshrc`.
* Add some nice functions for colors, padding, etc to make the script code reusable.
* Add a git status symbol to the prompt to indicate staged/clean/dirty.
* Set the git branch status in `/tmp` in a fancy way to avoid rerunning repeatedly.

Minor
-----
* Remove `auto-pairs` plugin, it's super irritating, I've decided.

Attribution
-----------
*BIG* thanks to @gabebw for
this zsh prompt makeover.

This is all built on top of
his dotfiles with no innovation.

Follow his dotfiles here: https://github.com/gabebw/dotfiles
@adarsh adarsh merged commit b90242c into master Apr 4, 2016
@adarsh adarsh deleted the ap-gbw-prompt-magick branch April 4, 2016 19:07
@adarsh adarsh mentioned this pull request Apr 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants