Fix the shoot-screen() function
s/exit/return/ since this function is to be called from an interactive shell.
--- a/zshrc.d/30-functions-shoot-screen.zrc Mon Aug 06 22:44:48 2012 +0200
+++ b/zshrc.d/30-functions-shoot-screen.zrc Wed Sep 04 19:33:22 2013 +0200
@@ -23,8 +23,8 @@
if (( usage != 0 )); then
print "Usage: $0 [-h] [-p prefix] [-e extension] [-d delay]" >&2
- if (( usage == 1 )); then exit 0; fi
- exit -1
+ if (( usage == 1 )); then return 0; fi
+ return -1
fi
local n=0
@@ -42,7 +42,7 @@
done
print "\nCapture: $filename"
import $filename
- if [[ $? != 0 ]]; then exit $?; fi
+ if [[ $? != 0 ]]; then return $?; fi
print
done
}