Project

General

Profile

« Previous | Next » 

Revision 12710

lib/sh/util.sh: added enter_top_dir and use it in in_top_dir

View differences:

trunk/lib/sh/util.sh
830 830
}
831 831
set_paths
832 832

  
833
# usage: $(enter_top_dir; cmd...)
834
function enter_top_dir() { echo_func; cd "$top_dir"; }
835
alias enter_top_dir='log++; "enter_top_dir"'
836

  
833 837
# usage: in_top_dir cmd...
834
function in_top_dir() { echo_func; (cd "$top_dir"; "$@"); }
838
function in_top_dir() { echo_func; (enter_top_dir; "$@"); }
835 839
alias in_top_dir='"in_top_dir" ' # last space alias-expands next word
836 840

  
837 841
PATH_rm() # usage: PATH_rm path... # removes components from the PATH

Also available in: Unified diff