diff options
Diffstat (limited to '01_Internal.zsh')
-rw-r--r-- | 01_Internal.zsh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/01_Internal.zsh b/01_Internal.zsh index 217b013..20c02c3 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -196,6 +196,7 @@ __get_git_branch () # Get current working GIT branch my_git_branch="$(git symbolic-ref --short -q HEAD)" + #my_git_branch="$(git name-rev --name-only HEAD)" # for future use checkouted_branch=$my_git_branch @@ -366,7 +367,8 @@ __get_git_tracking_status() { svn_current=$(git svn find-rev HEAD 2>/dev/null) # Finds any reference upwards current HEAD, and get the latest possible git-svn-id - svn_track=$(git log --grep git-svn-id -1 --pretty=%h $(git branch -a --contains=HEAD | cut -c3-) -- ) + #svn_track=$(git log --grep git-svn-id -1 --pretty=%h $(git branch -a --contains=HEAD | cut -c3-) -- ) + svn_track=$(git log --grep git-svn-id -1 --pretty=%h HEAD) svn_rev=$(git svn find-rev $svn_track) # eval $( git svn info | awk '/^URL: / { print "svn_url="$2 } # /^Repository UUID: / { print "svn_repo="$3 } @@ -683,12 +685,24 @@ zle -N _rehash # Process helper _process_tree() { + FULLCMD=0 + if [ "$1" = "-f" ] + then + FULLCMD=1 + shift + fi + for leaf in ${@:-$$} do - ps -eo pid,ppid,command 2>&- | awk -v leaf="$leaf" \ + ps -wweo pid,ppid,command | awk -v fullcmd=$FULLCMD -v leaf="$leaf" \ '{ parent[$1]=$2 ; command[$1]=$3 ; + if (fullcmd && NF>=4) { + for (i=4; i<=NF; i++) { + command[$1]=command[$1]" "$i ; + } + } } function print_ancestry(pid) { |