grimoire/bash/whitespace

17 lines
302 B
Plaintext
Executable File

command_not_found_handle() {
if [[ $2 != =* ]]; then
printf '%s: %s: command not found\n' "$0" "$1" >&2
fi
}
make_assign() {
local name equal value
read -r name equal value <<< "$BASH_COMMAND"
if [[ $equal = =* ]]; then
declare -g "$name$equal$value"
fi
}
trap make_assign DEBUG