Skip to content

Commit

Permalink
Quote _filedir arguments when appropriate to prevent failglob failures
Browse files Browse the repository at this point in the history
  • Loading branch information
GArik committed Jun 4, 2014
1 parent 24c8f1e commit 8566a5a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion completions/cppcheck
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ _cppcheck()
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
else
_filedir @([cht]pp|[cht]xx|cc|[ch]++|[ch])
_filedir '@([cht]pp|[cht]xx|cc|[ch]++|[ch])'
fi
} &&
complete -F _cppcheck cppcheck
Expand Down
2 changes: 1 addition & 1 deletion completions/installpkg
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _installpkg()
return 0
fi

_filedir "t[bglx]z"
_filedir 't[bglx]z'
} && complete -F _installpkg installpkg

# ex: ts=4 sw=4 et filetype=sh
2 changes: 1 addition & 1 deletion completions/k3b
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _k3b()
return 0
;;
--cdimage|--image)
_filedir @(cue|iso|toc)
_filedir '@(cue|iso|toc)'
return 0
;;
--dvdimage)
Expand Down
2 changes: 1 addition & 1 deletion completions/sqlite3
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _sqlite3()
return 0
fi

_filedir $dbexts
_filedir "$dbexts"
} &&
complete -F _sqlite3 sqlite3

Expand Down
2 changes: 1 addition & 1 deletion completions/tar
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ _tar()
*[jy]*) ext='t@(?(ar.)bz?(2)|b2)' ;;
*J*) ext='t?(ar.)xz' ;;
esac
_filedir $ext
_filedir "$ext"
else
_filedir
fi
Expand Down
2 changes: 1 addition & 1 deletion completions/upgradepkg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _upgradepkg()
return
fi

_filedir "t[bglx]z"
_filedir 't[bglx]z'
} && complete -F _upgradepkg upgradepkg

# ex: ts=4 sw=4 et filetype=sh

0 comments on commit 8566a5a

Please sign in to comment.