Procházet zdrojové kódy

Merge pull request #502 from zsh-users/cleanup/idiomatic-check-if-set

cleanup: Use more idiomatic method of checking if var is set
pull/506/merge
Eric Freese před 4 roky
odevzdal GitHub
rodič
revize
a32fe24acc
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 4AEE18F83AFDEB23
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. +2
    -2
      src/widgets.zsh
  2. +2
    -2
      zsh-autosuggestions.zsh

+ 2
- 2
src/widgets.zsh Zobrazit soubor

@ -20,7 +20,7 @@ _zsh_autosuggest_enable() {
# Toggle suggestions (enable/disable)
_zsh_autosuggest_toggle() {
if [[ -n "${_ZSH_AUTOSUGGEST_DISABLED+x}" ]]; then
if (( ${+_ZSH_AUTOSUGGEST_DISABLED} )); then
_zsh_autosuggest_enable
else
_zsh_autosuggest_disable
@ -79,7 +79,7 @@ _zsh_autosuggest_modify() {
fi
# Bail out if suggestions are disabled
if [[ -n "${_ZSH_AUTOSUGGEST_DISABLED+x}" ]]; then
if (( ${+_ZSH_AUTOSUGGEST_DISABLED} )); then
return $?
fi

+ 2
- 2
zsh-autosuggestions.zsh Zobrazit soubor

@ -282,7 +282,7 @@ _zsh_autosuggest_enable() {
# Toggle suggestions (enable/disable)
_zsh_autosuggest_toggle() {
if [[ -n "${_ZSH_AUTOSUGGEST_DISABLED+x}" ]]; then
if (( ${+_ZSH_AUTOSUGGEST_DISABLED} )); then
_zsh_autosuggest_enable
else
_zsh_autosuggest_disable
@ -341,7 +341,7 @@ _zsh_autosuggest_modify() {
fi
# Bail out if suggestions are disabled
if [[ -n "${_ZSH_AUTOSUGGEST_DISABLED+x}" ]]; then
if (( ${+_ZSH_AUTOSUGGEST_DISABLED} )); then
return $?
fi

Načítá se…
Zrušit
Uložit