commit e3705f0283ac1c4c382f9f18c2da3703f8210c17
parent 74c51390f09e8909bffccfdef5ec285e8544774a
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Sun, 22 Nov 2020 18:17:18 -0800
Add sman documentation to six more scripts
Diffstat:
6 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/modules/scripts/.local/bin/feed b/modules/scripts/.local/bin/feed
@@ -1,5 +1,12 @@
#!/usr/bin/env dash
#! feed -- search and display items from sfeed(5) formatted files
+#!
+#! There are three commands, `-h' which displays a brief usage, `-l'
+#! which lists the given feeds items, and `-n' which displays the given
+#! feeds `nth' item.
+#!
+#! If none of the above are given the command is passed to egrep(1) and
+#! matching items are displayed.
set -eu
diff --git a/modules/scripts/.local/bin/fsmenu b/modules/scripts/.local/bin/fsmenu
@@ -1,5 +1,8 @@
#!/usr/bin/env dash
#! fsmenu -- navigate the filesystem with dmenu
+#!
+#! The -a flag causes hidden files to be shown, the -t option passes the
+#! value to find(1)'s -type option.
set -e
diff --git a/modules/scripts/.local/bin/gp b/modules/scripts/.local/bin/gp
@@ -1,5 +1,8 @@
#!/usr/bin/env dash
#! gp -- find and copy pass(1) passwords to the clipboard
+#!
+#! Every argument is passed egrep(1) therefor any argument egrep accepts
+#! is valid.
set -eu
diff --git a/modules/scripts/.local/bin/mato b/modules/scripts/.local/bin/mato
@@ -1,5 +1,9 @@
#!/usr/local/bin/rc -e
#! mato -- add current mpd song to an m3u playlist
+#!
+#! The current track is added to each file specified, prefixed by mpd's
+#! playlist_directory setting, unless it's a duplicate in which case
+#! added and a warning is printed to the standard error.
progname = `{ basename $0 }
diff --git a/modules/scripts/.local/bin/now b/modules/scripts/.local/bin/now
@@ -1,5 +1,8 @@
#!/usr/bin/env dash
#! now -- display system date and or time in an fs friendly format
+#!
+#! The -f flag is default, the flags are thus: `f' for full date and
+#! time, `d' for date, and `t' for time.
set -eu
diff --git a/modules/scripts/.local/bin/tat b/modules/scripts/.local/bin/tat
@@ -1,5 +1,12 @@
#!/usr/bin/env ksh
#! tat -- attach to tmux session via an external menu
+#!
+#! With no arguments the select builtin of ksh(1) is used to select a
+#! session and it is attached to using ksh.
+#!
+#! If the -e flag is given dmenu is used and the session is spawned
+#! within a graphical terminal as specified by the TERMINAL environment
+#! variable.
list() { tmux ls | cut -d: -f1 ;}
nth() { head -n $@ | tail -1 ;}