dracula / zsh

🧛🏻‍♂️ Dark theme for ZSH
https://draculatheme.com/zsh
MIT License
273 stars 69 forks source link

`unknown keyword -k` error when `DRACULA_DISPLAY_TIME=1` #14

Closed ignlg closed 5 years ago

ignlg commented 5 years ago

After enabling

DRACULA_DISPLAY_TIME=1

ZSH outputs an error on every prompt print:

Last login: Wed Sep 25 21:44:29 on ttys011
unknown keyword -k
➜  9:45PM ~ unknown keyword -k
➜  9:45PM ~
➜  9:48PM ~ zsh --version
zsh 5.3 (x86_64-apple-darwin18.0)
unknown keyword -k
➜  9:48PM ~ unknown keyword -k
➜  9:48PM ~

Version: zsh 5.3 (x86_64-apple-darwin18.0)

Glennmen commented 5 years ago

It looks like locale -c LC_TIME -k isn't supported by macOS. https://github.com/dracula/zsh/blob/91741d3e44c2d7a9aa20a0c22b5e3e904ec4f8d2/dracula.zsh-theme#L70-L72

But I think it can be fixed/replaced with locale -ck LC_TIME.

If accepted I can do some more testing and make a PR.

ignlg commented 5 years ago

Good catch! locale -ck LC_TIME seems to work flawlessly in macOS and GNU/Linux.

Glennmen commented 5 years ago

@ignlg you mean locale -ck LC_TIME I hope 😅

ignlg commented 5 years ago

@Glennmen yes! Sorry, fixed 🤦‍♂ I tested locale -ck LC_TIME (sh history checked)