Project

General

Profile

« Previous | Next » 

Revision 9010

lib/util.sh: limit_stderr_cmd (): only echo the command if it starts with echo_run. this requires adding echo_run before commands that use limit_stderr_cmd, such as limit_stderr_extern.

View differences:

util.sh
114 114

  
115 115
limit_stderr_cmd () # usage: [stdout2stderr=1] limit_stderr_cmd cmd...
116 116
{
117
	case "$1" in echo_run) shift;; esac
118
	echo_cmd "$@"
117
	case "$1" in echo_run) shift; echo_cmd "$@";; esac
119 118
	(limit_stderr
120 119
		if test -n "$stdout2stderr"; then stdout2stderr; fi
121 120
		"$@"
......
131 130
for cmd in rm; do alias "$cmd=echo_run $cmd"; done; unset cmd
132 131

  
133 132
# limits stderr of (and echoes) an external command
134
alias limit_stderr_extern='limit_stderr_cmd "extern" '
133
alias limit_stderr_extern='limit_stderr_cmd echo_run "extern" '
135 134
	# last space alias-expands next word
136 135

  
137 136
# echo and limit stderr of all external commands

Also available in: Unified diff