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