-
Notifications
You must be signed in to change notification settings - Fork 2
have aliases issue warning if which doesn't resolve program #63
Copy link
Copy link
Open
Description
Aliases using which to locate programs should use helper that issues warning when the program is not found. This will avoid warnings like the following:
$ echo hey | check-errors 2>&1 | cat
/home/ec2-user/anaconda3/bin/python3: can't find '__main__' module in '/home/ec2-user/'
This happens because check-errors uses convert_emoticons.py for filtering:
$ show-macros check-errors
...
check-errors ()
{
local args=("$@");
if [[ ( $# -eq 0 ) || ( ${args[$# - 1]} =~ ^-+ ) ]]; then
args+=("-");
fi;
( DEBUG_LEVEL=$ALIAS_DEBUG_LEVEL QUIET=1 DURING_ALIAS=1 CONTEXT=5 check-errors-aux "${args[@]}" ) 2>&1 | DEBUG_LEVEL=$ALIAS_DEBUG_LEVEL DURING_ALIAS=1 DEBUG_LEVEL=$ALIAS_DEBUG_LEVEL python3 "$(which convert_emoticons.py)" - | $PAGER
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels