Skip to content

Commit

Permalink
fix(show): listed session abbreviation commands include -S
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Mar 7, 2020
1 parent 1a17812 commit 57f98ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -437,7 +437,7 @@ Abbreviations can also be manually renamed in the `ZSH_USER_ABBREVIATIONS_PATH`.
abbr [(--show|-s)]
```

Show all the abbreviations available in the current session, along with their expansions. _**Show** does not take a scope._ Session abbreviations are marked `-g` and follow user abbreviations, which are marked `-U`.
Show all the abbreviations available in the current session, along with their expansions. _**Show** does not take a scope._ Session abbreviations are marked `-S` and follow user abbreviations.

```shell
% abbr --add gcm git checkout master
Expand Down
4 changes: 2 additions & 2 deletions zsh-abbr.zsh
Expand Up @@ -469,11 +469,11 @@ _zsh_abbr() {
cat $ZSH_ABBR_USER_PATH

for abbreviation expansion in ${(kv)ZSH_ABBR_SESSION_GLOBALS}; do
printf "abbr -g %s=\"%s\"\\n" "$abbreviation" "$expansion"
printf "abbr -S -g %s=\"%s\"\\n" "$abbreviation" "$expansion"
done

for abbreviation expansion in ${(kv)ZSH_ABBR_SESSION_COMMANDS}; do
printf "abbr %s=\"%s\"\\n" "$abbreviation" "$expansion"
printf "abbr -S %s=\"%s\"\\n" "$abbreviation" "$expansion"
done
}

Expand Down

0 comments on commit 57f98ea

Please sign in to comment.