Skip to content

Commit

Permalink
Merge branch 'mac-system-substitutions'
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed May 2, 2021
2 parents cec7b03 + f8ea70b commit 99af045
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,15 @@ bindkey -v
zinit light olets/zsh-abbr
```

## macOS System Text Substitutions

The following snippet will make your global macOS text substitutions available in the shell.

```shell
for substitution in ${(f)"$(defaults read ~/Library/Preferences/.GlobalPreferences.plist NSUserDictionaryReplacementItems | plutil -convert json -o - - | jq -r 'to_entries[] | "\(.value.replace)=\(.value.with)"')"}; do
abbr add [options] "$substitution"
done
```
## Performance

zsh-abbr will not affect time between prompts. The following is the impact of zsh-abbr on time to start a new session, profiled with `zprof` and `zinit light olets/zsh-abbr`.
Expand Down

0 comments on commit 99af045

Please sign in to comment.