Skip to content

Commit

Permalink
feat(config): deprecate ABBR_DEFAULT_BINDINGS 'true'/'false' (use 0/1)
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Jun 14, 2020
1 parent 113ffc6 commit 5f25f1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -518,12 +518,12 @@ By default

(In incremental search mode, <kbd>Space</kbd> is a normal space and <kbd>Ctrl</kbd><kbd>Space</kbd> expands abbreviations.)

If you want to set your own bindings, set `ABBR_DEFAULT_BINDINGS` to `0` or `false` in your `.zshrc` before loading zsh-abbr. In the following example, expansion is bound to <kbd>Ctrl</kbd><kbd>a</kbd>:
If you want to set your own bindings, set `ABBR_DEFAULT_BINDINGS` to `0` in your `.zshrc` before loading zsh-abbr. In the following example, expansion is bound to <kbd>Ctrl</kbd><kbd>a</kbd>:

```shell
% cat ~/.zshrc
# -- snip --
ABBR_DEFAULT_BINDINGS=false
ABBR_DEFAULT_BINDINGS=0
bindkey "^A" _abbr_expand_space
# -- snip --
# load zsh-abbr
Expand Down
1 change: 1 addition & 0 deletions zsh-abbr.zsh
Expand Up @@ -1338,6 +1338,7 @@ abbr() {

# Deprecation notices for values that could not be meaningfully set after initialization
(( ${+ZSH_ABBR_DEFAULT_BINDINGS} )) && _abbr_deprecated ZSH_ABBR_DEFAULT_BINDINGS ABBR_DEFAULT_BINDINGS
[ $ABBR_DEFAULT_BINDINGS = true ] && _abbr_deprecated "String value (\`true\` and \`false\`) ABBR_DEFAULT_BINDINGS" "Boolean value (\`0\` and \`1\`)"

# Deprecation notices for functions
_zsh_abbr() {
Expand Down

0 comments on commit 5f25f1c

Please sign in to comment.