Skip to content

Commit f3b05b4

Browse files
Fix word splitting issues in README.md
Signed-off-by: Thomas D. Spear <thomas.spear@wcgclinical.com>
1 parent 3e2053a commit f3b05b4

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

‎README.md‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -455,13 +455,13 @@ make sure to disable the current theme in your plugin manager. See
455455

456456
1. Clone the repository:
457457
```zsh
458-
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
458+
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-"${HOME}/.oh-my-zsh/custom"}/themes/powerlevel10k"
459459
```
460460
Users in China can use the official mirror on gitee.com for faster download.<br>
461461
中国用户可以使用 gitee.com 上的官方镜像加速下载.
462462

463463
```zsh
464-
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
464+
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-"${HOME}/.oh-my-zsh/custom"}/themes/powerlevel10k"
465465
```
466466
2. Open `~/.zshrc`, find the line that sets `ZSH_THEME`, and change its value to `"powerlevel10k/powerlevel10k"`.
467467

@@ -523,7 +523,7 @@ Add `plug "romkatv/powerlevel10k"` to `~/.zshrc`.
523523

524524
```zsh
525525
brew install powerlevel10k
526-
echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
526+
echo "source \"$(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme\"" >>~/.zshrc
527527
```
528528

529529
### Arch Linux
@@ -717,7 +717,7 @@ If you are using a different terminal, proceed with manual font installation.
717717
Restart kitty by closing all sessions and opening a new session.
718718
- **puTTY**: Set *Window* → *Appearance* → *Font* to `MesloLGS NF`. Requires puTTY
719719
version >= 0.75.
720-
- **WezTerm**: Create or open `$HOME/.config/wezterm/wezterm.lua` and add the following:
720+
- **WezTerm**: Create or open `"${HOME}/.config/wezterm/wezterm.lua"` and add the following:
721721
```lua
722722
local wezterm = require 'wezterm';
723723
return {
@@ -857,7 +857,7 @@ The command to update Powerlevel10k depends on how it was installed.
857857
| Installation | Update command |
858858
|-------------------------------|-------------------------------------------------------------|
859859
| [Manual](#manual) | `git -C ~/powerlevel10k pull` |
860-
| [Oh My Zsh](#oh-my-zsh) | `git -C ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k pull` |
860+
| [Oh My Zsh](#oh-my-zsh) | `git -C "${ZSH_CUSTOM:-"${HOME}/.oh-my-zsh/custom"}/themes/powerlevel10k" pull` |
861861
| [Prezto](#prezto) | `zprezto-update` |
862862
| [Zim](#zim) | `zimfw update` |
863863
| [Antigen](#antigen) | `antigen update` |
@@ -879,8 +879,8 @@ The command to update Powerlevel10k depends on how it was installed.
879879
880880
1. Remove all references to "p10k" from `~/.zshrc`. You might have this snippet at the top:
881881
```zsh
882-
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
883-
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
882+
if [[ -r "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
883+
source "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh"
884884
fi
885885
```
886886
And this at the bottom:
@@ -911,7 +911,7 @@ The command to update Powerlevel10k depends on how it was installed.
911911
| Installation | Uninstall command |
912912
|-------------------------------|------------------------------------------------------------------|
913913
| [Manual](#manual) | `rm -rf ~/powerlevel10k` |
914-
| [Oh My Zsh](#oh-my-zsh) | `rm -rf -- ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` |
914+
| [Oh My Zsh](#oh-my-zsh) | `rm -rf -- "${ZSH_CUSTOM:-"${HOME}/.oh-my-zsh/custom"}/themes/powerlevel10k"` |
915915
| [Prezto](#prezto) | n/a |
916916
| [Zim](#zim) | `zimfw uninstall` |
917917
| [Antigen](#antigen) | `antigen purge romkatv/powerlevel10k` |
@@ -928,7 +928,7 @@ The command to update Powerlevel10k depends on how it was installed.
928928
6. Restart Zsh. [Do not use `source ~/.zshrc`](#weird-things-happen-after-typing-source-zshrc).
929929
7. Delete Powerlevel10k cache files.
930930
```zsh
931-
rm -rf -- "${XDG_CACHE_HOME:-$HOME/.cache}"/p10k-*(N) "${XDG_CACHE_HOME:-$HOME/.cache}"/gitstatus
931+
rm -rf -- "${XDG_CACHE_HOME:-"${HOME}/.cache"}"/p10k-*(N) "${XDG_CACHE_HOME:-"${HOME}/.cache"}/gitstatus"
932932
```
933933
934934
### How do I install Powerlevel10k on a machine without Internet access?
@@ -942,7 +942,7 @@ The command to update Powerlevel10k depends on how it was installed.
942942
```sh
943943
target_uname="replace this with the output of the previous command"
944944
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
945-
GITSTATUS_CACHE_DIR="$HOME"/powerlevel10k/gitstatus/usrbin ~/powerlevel10k/gitstatus/install -f -s "${target_uname% *}" -m "${target_uname#* }"
945+
GITSTATUS_CACHE_DIR="${HOME}/powerlevel10k/gitstatus/usrbin" ~/powerlevel10k/gitstatus/install -f -s "${target_uname% *}" -m "${target_uname#* }"
946946
```
947947
3. Copy `~/powerlevel10k` from the machine connected to the Internet to the one without Internet
948948
access.
@@ -1003,7 +1003,7 @@ Powerlevel10k does not affect:
10031003
1. Run this command:
10041004
```zsh
10051005
# Add powerlevel10k to the list of Oh My Zsh themes.
1006-
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
1006+
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-"${HOME}/.oh-my-zsh/custom"}/themes/powerlevel10k"
10071007
# Replace ZSH_THEME="powerlevel9k/powerlevel9k" with ZSH_THEME="powerlevel10k/powerlevel10k".
10081008
sed -i.bak 's/powerlevel9k/powerlevel10k/g' ~/.zshrc
10091009
# Restart Zsh.
@@ -1039,8 +1039,8 @@ code snippet at the top of `~/.zshrc`:
10391039
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
10401040
# Initialization code that may require console input (password prompts, [y/n]
10411041
# confirmations, etc.) must go above this block; everything else may go below.
1042-
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
1043-
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
1042+
if [[ -r "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
1043+
source "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh"
10441044
fi
10451045
```
10461046
@@ -1063,8 +1063,8 @@ the output, or move it above the instant prompt preamble.
10631063
Here's an example of `~/.zshrc` that breaks when instant prompt is enabled:
10641064
10651065
```zsh
1066-
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
1067-
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
1066+
if [[ -r "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
1067+
source "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh"
10681068
fi
10691069
10701070
keychain id_rsa --agents ssh # asks for password
@@ -1078,8 +1078,8 @@ Fixed version:
10781078
keychain id_rsa --agents ssh # moved before instant prompt
10791079
10801080
# OK to perform console I/O before this point.
1081-
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
1082-
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
1081+
if [[ -r "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
1082+
source "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh"
10831083
fi
10841084
# From this point on, until zsh is fully initialized, console input won't work and
10851085
# console output may appear uncolored.
@@ -1116,8 +1116,8 @@ If you've enabled [instant prompt](#instant-prompt), you should have these lines
11161116
`~/.zshrc`:
11171117
11181118
```zsh
1119-
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
1120-
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
1119+
if [[ -r "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
1120+
source "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh"
11211121
fi
11221122
```
11231123
@@ -1126,8 +1126,8 @@ To initialize direnv you need to add one line above that block and one line belo
11261126
```zsh
11271127
(( ${+commands[direnv]} )) && emulate zsh -c "$(direnv export zsh)"
11281128
1129-
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
1130-
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
1129+
if [[ -r "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
1130+
source "${XDG_CACHE_HOME:-"${HOME}/.cache"}/p10k-instant-prompt-${(%):-%n}.zsh"
11311131
fi
11321132
11331133
(( ${+commands[direnv]} )) && emulate zsh -c "$(direnv hook zsh)"
@@ -1141,12 +1141,12 @@ fi
11411141
You can export `GPG_TTY` like this anywhere in `~/.zshrc`:
11421142
11431143
```zsh
1144-
export GPG_TTY=$TTY
1144+
export GPG_TTY="${TTY}"
11451145
```
11461146
11471147
This works whether you are using [instant prompt](#instant-prompt) or not. It works even if you
11481148
aren't using powerlevel10k. As an extra bonus, it's much faster than the commonly used
1149-
`export GPG_TTY=$(tty)`.
1149+
`export GPG_TTY="$(tty)"`.
11501150
11511151
*Related*: [How do I initialize direnv when using instant prompt?](
11521152
#how-do-i-initialize-direnv-when-using-instant-prompt)
@@ -1574,7 +1574,7 @@ When opening a terminal, or starting zsh manually, you may encounter this error
15741574
- If `typeset -p P9K_VERSION` fails with the error `typeset: no such variable: P9K_VERSION`, run
15751575
the following command:
15761576
```zsh
1577-
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
1577+
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-"${HOME}/.oh-my-zsh/custom"}/themes/powerlevel10k"
15781578
```
15791579
2. Restart Zsh with `exec zsh`.
15801580

0 commit comments

Comments
 (0)