grimoire/bash/whitespace

16 lines
302 B
Text
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