From 2e51e6a701782faef657d7549d27a5638aed7f70 Mon Sep 17 00:00:00 2001 From: Erich Smith Date: Sat, 5 May 2012 22:49:27 -0400 Subject: [PATCH] update to composure 1e26d79b minor edits https://github.com/erichs/composure/commit/1e26d79b --- lib/composure.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/composure.sh b/lib/composure.sh index 1bbf400d..37962a8a 100644 --- a/lib/composure.sh +++ b/lib/composure.sh @@ -1,5 +1,5 @@ # composure - by erichs -# light-hearted shell functions for intuitive shell programming +# light-hearted functions for intuitive shell programming # install: source this script in your ~/.profile or ~/.${SHELL}rc script @@ -27,7 +27,7 @@ cite () # anything following a keyword will get parsed as a positional # parameter, but stay resident in the ENV. As opposed to shell - # comments, '#', which do not get parsed, thus are not available + # comments, '#', which do not get parsed and are not available # at runtime. # a BIG caveat--your metadata must be roughly parsable: do not use @@ -105,7 +105,8 @@ listfunctions () typeset x ans typeset this=$(for x in $(ps -p $$); do ans=$x; done; printf "%s\n" $ans | sed 's/^-*//') - case "$this" in + typeset shell=$(basename $this) # e.g. /bin/bash => bash + case "$shell" in bash) typeset -F | awk '{print $3}' ;;