Project

General

Profile

« Previous | Next » 

Revision 14721

lib/sh/util.sh: added get_stack_frame_after()

View differences:

trunk/lib/sh/util.sh
303 303
alias get_stack_frame='declare func file line && "get_stack_frame"'
304 304
	# && instead of ; so it can be used as a while cond
305 305

  
306
get_stack_frame_after() # usage: exclude=_* get_stack_frame_after
307
{
308
	: "${exclude:?}"; skip_stack_frame; init_i
309
	while get_stack_frame && matches "$exclude" "$func"; do # matching frame
310
		next_stack_frame # skip matching frame
311
	done
312
}
313

  
306 314
format_stack_frame() #usage: "$(func=_ file=_ line=_ format_stack_frame [args])"
307 315
{
308 316
	file="$(canon_rel_path "$file")" || return

Also available in: Unified diff