Skip to content

Commit

Permalink
fix(expand and accept): respect trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Mar 7, 2020
1 parent bbf08d0 commit f027565
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion zsh-abbr.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,13 @@ _zsh_abbr_cmd_expansion() {
}

_zsh_abbr_expand_and_accept() {
zle _zsh_abbr_expand_widget
local trailing_space
trailing_space=${LBUFFER##*[^[:IFSSPACE:]]}

if [[ -z $trailing_space ]]; then
zle _zsh_abbr_expand_widget
fi

zle accept-line
}

Expand Down

0 comments on commit f027565

Please sign in to comment.