about summary refs log tree commit diff stats
path: root/pkgs/by-name/ne/neorg/functions/f_stop.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ne/neorg/functions/f_stop.sh')
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/f_stop.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/by-name/ne/neorg/functions/f_stop.sh b/pkgs/by-name/ne/neorg/functions/f_stop.sh
new file mode 100755
index 00000000..e4ff0b94
--- /dev/null
+++ b/pkgs/by-name/ne/neorg/functions/f_stop.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env dash
+
+fstop0stop_current_task() {
+    # we ensured that only one task may be active
+    active="$(task +ACTIVE _ids)"
+    [ "$active" ] && task stop "$active"
+}