Skip to content

Commit

Permalink
fix: handle null globs correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccaffery committed Jan 5, 2021
1 parent cf33dde commit 19c07ee
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/bash/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ shopt -s checkwinsize # check window size on script exit
shopt -s cdable_vars # enable change directory to a variable value
shopt -s extglob # enable extended glob patterns
shopt -s globstar # enable glob ** expansion
shopt -s nullglob # enable nullglob

# get bash completion dir
export BASH_COMPLETION_DIR="$LOCAL_PREFIX/etc/bash_completion.d"
Expand Down
2 changes: 1 addition & 1 deletion src/bash/scripts/eval/set-completion
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if [ ! -d "$AM_PROMPT/bash/completions" ]; then
fi

# iterate over each completion
for AM_COMPLETION in $AM_PROMPT/bash/completions/* 2>/dev/null; do
for AM_COMPLETION in $AM_PROMPT/bash/completions/*; do

# source the completion
. "$AM_COMPLETION"
Expand Down
2 changes: 1 addition & 1 deletion src/zsh/scripts/eval/set-completion
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [ ! -d "$AM_PROMPT/zsh/completions" ]; then
fi

# iterate over each completion
for AM_COMPLETION in $AM_PROMPT/zsh/completions/* 2>/dev/null; do
for AM_COMPLETION in $AM_PROMPT/zsh/completions/*; do

# source the completion
. "$AM_COMPLETION"
Expand Down
1 change: 1 addition & 0 deletions src/zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fi
# shell options
setopt cdable_vars
setopt inc_append_history
setopt +o nomatch

# rebuild completion
rm -rf $HOME/.zcompdump
Expand Down

0 comments on commit 19c07ee

Please sign in to comment.