dracula / zsh

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

Fix `$DRACULA_ARROW_ICON` getting parsed as a command-line flag to `print` #51

Open speelbarrow opened 1 year ago

speelbarrow commented 1 year ago

When $DRACULA_ARROW_ICON begins with an unescaped - character, it will be read as a command line flag by the print command. This causes the error dracula_arrow:print:2: bad option: -> (for example) to get outputted on each new prompt line. This PR passes the -- flag to print before passing $DRACULA_ARROW_ICON to ensure that print does not attempt to parse the arrow icon as a command-line flag.

If you're fixing a UI issue, make sure you take two screenshots. One that shows the actual bug and another that shows how you fixed it.

Before:

Screenshot 2023-05-31 at 9 24 18 AM

After:

Screenshot 2023-05-31 at 9 24 47 AM

Note: the literal string value of $DRACULA_ARROW_ICON in this context is ->, I'm using a font with ligatures that merges those two first characters into one symbol.