cleanup: Use + param expansion flag in arithmetic context

This commit is contained in:
Eric Freese 2019-04-10 11:20:08 -06:00
parent 4cd210b70d
commit d8ba53678e
2 changed files with 2 additions and 2 deletions

View file

@ -95,7 +95,7 @@ _zsh_autosuggest_modify() {
# Fetch a new suggestion based on what's currently in the buffer # Fetch a new suggestion based on what's currently in the buffer
_zsh_autosuggest_fetch() { _zsh_autosuggest_fetch() {
if [[ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]]; then if (( ${+ZSH_AUTOSUGGEST_USE_ASYNC} )); then
_zsh_autosuggest_async_request "$BUFFER" _zsh_autosuggest_async_request "$BUFFER"
else else
local suggestion local suggestion

View file

@ -366,7 +366,7 @@ _zsh_autosuggest_modify() {
# Fetch a new suggestion based on what's currently in the buffer # Fetch a new suggestion based on what's currently in the buffer
_zsh_autosuggest_fetch() { _zsh_autosuggest_fetch() {
if [[ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]]; then if (( ${+ZSH_AUTOSUGGEST_USE_ASYNC} )); then
_zsh_autosuggest_async_request "$BUFFER" _zsh_autosuggest_async_request "$BUFFER"
else else
local suggestion local suggestion