summaryrefslogtreecommitdiff
path: root/shell.sh
diff options
context:
space:
mode:
Diffstat (limited to 'shell.sh')
-rw-r--r--shell.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/shell.sh b/shell.sh
new file mode 100644
index 0000000..45cf5cf
--- /dev/null
+++ b/shell.sh
@@ -0,0 +1,20 @@
+suspend() {
+ if [ x"$0" -ne x"${0#-}" ]; then
+ #TODO: handle -f
+ printf 'suspend: not suspending login shell\n' >&2
+ else
+ kill -STOP $$
+ fi
+}
+
+logout() {
+ if [ x"$0" -ne x"${0#-}" ]; then
+ printf 'logout: use exit to leave non-login shell\n' >&2
+ else
+ exit "$@"
+ fi
+}
+
+source() {
+ . "$@"
+}