joecannatti / soji

Terminal Based Mindful Workday System
GNU Affero General Public License v3.0
75 stars 16 forks source link

prompt doesn't work for zsh #21

Open chellberg opened 7 years ago

chellberg commented 7 years ago

I know this is a known/suspected issue, but wanted to create an issue for it to collect helpful resources and maybe discuss how to structure zsh support. I'm planning to work on this in the next few days, as I'm extremely excited about soji and also a zsh user. I was able to get some colors working in zsh by just adding %{...%} around the color variables in header, but there were extraneous characters and $(soji_status) wasn't being interpolated, so I'm planning to work on using the actual zsh colors/prompt syntax.

Resources I've found so far that might be useful:

http://superuser.com/questions/735660/whats-the-zsh-equivalent-of-bashs-prompt-command (includes what looks like a good way of detecting whether soji is running in bash or zsh)

https://github.com/zsh-users/zsh/blob/master/Misc/bash2zshprompt

http://zshwiki.org/home/convert/bash

http://stackoverflow.com/questions/689765/how-can-i-change-the-color-of-my-prompt-in-zsh-different-from-normal-text

https://bbs.archlinux.org/viewtopic.php?id=79407

http://stackoverflow.com/questions/30568258/using-ansi-escape-sequences-in-zsh-prompt

In the meantime, I'm using soji in bash and sourcing my .zshrc, with no obvious ill effects so far. It sounds like I may need to try an orgmode plugin for macvim also.

Anyway, thanks for soji and the great blog post about it!