docs: fix typo in starship.ps1 (#3173)

preceeding -> preceding
This commit is contained in:
Ikko Ashimine 2021-10-23 01:14:43 +09:00 committed by GitHub
parent 63d79a4305
commit 425af13026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -43,8 +43,8 @@ function global:prompt {
# Build an arguments string which follows the C++ command-line argument quoting rules
# See: https://docs.microsoft.com/en-us/previous-versions//17w5ykft(v=vs.85)?redirectedfrom=MSDN
$escaped = $Arguments | ForEach-Object {
$s = $_ -Replace '(\\+)"','$1$1"'; # Escape backslash chains immediately preceeding quote marks.
$s = $s -Replace '(\\+)$','$1$1'; # Escape backslash chains immediately preceeding the end of the string.
$s = $_ -Replace '(\\+)"','$1$1"'; # Escape backslash chains immediately preceding quote marks.
$s = $s -Replace '(\\+)$','$1$1'; # Escape backslash chains immediately preceding the end of the string.
$s = $s -Replace '"','\"'; # Escape quote marks.
"`"$s`"" # Quote the argument.
}