Skip to content

Instantly share code, notes, and snippets.

Created Sep 22, 2018
What would you like to do?
#!/usr/bin/env bash
if test "$BASH" = "" || "$BASH" -uc "a=();true \"\${a[@]}\"" 2>/dev/null; then
# Bash 4.4, Zsh
set -euo pipefail
# Bash 4.3 and older chokes on empty arrays with set -u.
set -eo pipefail
shopt -s nullglob globstar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment