Project

General

Profile

« Previous | Next » 

Revision 9249

*{.sh,run}: don't use aliases unless it's actually necessary (e.g. to define a var in the calling function, or to alias-expand the next word)

View differences:

lib/sh/util.sh
354 354
### external command input/output
355 355

  
356 356
# usage: cmd1 | { pipe_delay; cmd2; }
357
alias pipe_delay='sleep 0.1' # s; display after leading output of cmd1
357
pipe_delay () { sleep 0.1; } # s; display after leading output of cmd1
358 358

  
359 359
fi # load new aliases
360 360
if self_being_included; then
......
371 371
	fi
372 372
}
373 373

  
374
alias echo_stdout='echo_stdin' # usage: cmd|echo_stdout
374
echo_stdout () { echo_stdin; } # usage: cmd|echo_stdout
375 375

  
376 376
fi # load new aliases
377 377
if self_being_included; then
lib/sh/archives.sh
15 15

  
16 16
unzip() { echo_func; cmd_log_fd=1 self "$@"; }
17 17

  
18
set_inv force
19
alias zip_newer='zip ${no_force:+-u }'
20
alias unzip_newer='unzip ${no_force:+-u }-o'
18
zip_newer()   { echo_func; set_inv force; zip   ${no_force:+-u }"$@"; }
19
unzip_newer() { echo_func; set_inv force; unzip ${no_force:+-u }-o "$@"; }
21 20
	# -o is safe because -u only extracts newer files
22 21

  
23 22
fi

Also available in: Unified diff