Skip to content

Commit

Permalink
Catch some more potentially unset parameters
Browse files Browse the repository at this point in the history
Fixes #344.
  • Loading branch information
marlonrichert committed Sep 25, 2021
1 parent b0d6753 commit f208d04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/.autocomplete.compinit
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ compdef() {
emulate -L zsh
setopt $_autocomplete__func_opts[@]

[[ -z $CDPATH ]] &&
[[ -v CDPATH && -z $CDPATH ]] &&
unset CDPATH cdpath

# Decrease Oh My Zsh start-up time. See below.
Expand Down
4 changes: 2 additions & 2 deletions scripts/.autocomplete.key-binding
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ zmodload -F zsh/parameter p:funcstack p:functions
builtin zstyle -s :autocomplete:tab: widget-style tab_style ||
tab_style='complete-word'

if builtin zstyle -t :autocomplete:tab: fzf ||
builtin zstyle -t :autocomplete:tab: fzf-completion; then
if builtin zstyle -t :autocomplete:tab: fzf-completion &&
[[ -v functions[fzf-completion] ]]; then
typeset -gH fzf_default_completion=$tab_style
functions[.autocomplete.fzf-completion]=$functions[fzf-completion]
fzf-completion() {
Expand Down

0 comments on commit f208d04

Please sign in to comment.