zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.89k stars 125 forks source link

fix: the starship example does not work properly #480

Closed xqm32 closed 1 year ago

xqm32 commented 1 year ago

The error may be caused by the space after the backslash, and sh requires that the character after the backslash should be \n to be regarded as a continuation line

A backslash preserves the literal meaning of the following character, with the exception of the newline character (`\n'). A backslash preceding a newline is treated as a line continuation.

refer to https://man.freebsd.org/cgi/man.cgi?query=sh

Description

Fixed wrong starship example in README.md

Motivation and Context

This PR addresses the unfixed issues raised by https://github.com/zdharma-continuum/zinit/issues/271, and makes the starship example work fine

Related Issue(s)

https://github.com/zdharma-continuum/zinit/issues/271

Usage examples

Same as the original usage

How Has This Been Tested?

Types of changes

Checklist:

vladdoster commented 1 year ago

@xqm32,

thanks for catching this. A dum question, but did you test this?

xqm32 commented 1 year ago

@xqm32,

thanks for catching this. A dum question, but did you test this?

I tested the modified script in zsh on my MacBook Air (M2 chip) and it works.

vladdoster commented 1 year ago

@xqm32,

Thanks for confirming. Merged!