aboutsummaryrefslogtreecommitdiff
path: root/man/man1
diff options
context:
space:
mode:
Diffstat (limited to 'man/man1')
-rw-r--r--man/man1/apf.174
-rw-r--r--man/man1/br.112
-rw-r--r--man/man1/dmp.114
-rw-r--r--man/man1/edda.110
-rw-r--r--man/man1/unf.12
-rw-r--r--man/man1/xgo.18
6 files changed, 63 insertions, 57 deletions
diff --git a/man/man1/apf.1 b/man/man1/apf.1
index 67b3b25a..7cb2ab28 100644
--- a/man/man1/apf.1
+++ b/man/man1/apf.1
@@ -7,30 +7,34 @@
foorc
foo --bar baz
.SH DESCRIPTION
-Add null-delimited arguments read from a file to a command's arguments before
-running it. This is intended as a way of implementing *rc files for interactive
-shell calls to programs that don't support such files, without having to use
-broken environment variables (e.g. GREP_OPTIONS); this enables you to, for
-example, use arguments with shell metacharacters and spaces in them that you do
-not want expanded.
-
+Add newline-delimited arguments read from a file to a command's arguments
+(before any given ones) before running it. This is intended as a quick way of
+implementing *rc files for interactive shell calls to programs that don't
+support such files, without having to use broken environment variables like GNU
+grep(1)'s GREP_OPTIONS.
+.P
+This enables you to use arguments with shell metacharacters and spaces in them
+that you do not want expanded. The only exception is that you cannot have
+newlines in any of the arguments. This was done to keep POSIX sh(1)
+compatibility.
+.P
For example, given this simple program in our $PATH, printargs:
-
- $ cat ~/.local/bin/printargs
+.P
+ $ cat /usr/bin/printargs
#!/bin/sh
- printf '%s\n' "$@"
-
+ printf '%s\\n' "$@"
+.P
Which just prints its arguments:
-
+.P
$ printargs a b c
a
b
c
-
+.P
We could do this:
-
- $ printf '%s\0' -f --flag --option '? foo bar *' > "$HOME"/.printargsrc
-
+.P
+ $ printf '%s\\n' -f --flag --option '? foo bar *' > "$HOME"/.printargsrc
+.P
$ apf "$HOME"/.printargsrc printargs a b c
-f
--flag
@@ -39,27 +43,23 @@ We could do this:
a
b
c
-
-We could then make a permanent wrapper function with:
-
+.P
+We could then make a permanent wrapper script in two line:
+.P
+ $ cat >~/.local/bin/printargs
+ #!/bin/sh
+ exec apf "$HOME"/.printargsrc /usr/bin/printargs
+ ^D
+ $ chmod +x ~/.local/bin/printargs
+.P
+Or just a shell function, if it's needed interactively:
+.P
$ printargs() { apf "$HOME"/.printargsrc printargs "$@" ; }
-
- $ printargs a b c
- -f
- --flag
- --option
- ? foo bar *
- a
- b
- c
-
- $ printf '%s\n' !-2:q >> "$HOME"/.bashrc
-
-This means you can edit the options in the *rc file, and don't have to redefine
-a wrapper function.
-
-If you actually want those options to *always* be added, regardless of whether
-you're in an interactive shell, you really should make an actual wrapper
-script.
+.P
+It's not considered an error if the file doesn't exist or is empty. If it's a
+directory or otherwise not byte-readable, an error will be printed to stderr,
+but execution of the called program will continue anyway. Blank lines or lines
+beginning with # are also ignored. Both leading and trailing whitespace is
+preserved.
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>
diff --git a/man/man1/br.1 b/man/man1/br.1
index ad841750..5f6de5f7 100644
--- a/man/man1/br.1
+++ b/man/man1/br.1
@@ -12,14 +12,12 @@ BROWSER=firefox
.B br
.SH DESCRIPTION
.B br
-run with no arguments just execs the program in the $BROWSER environment
-variable. If given a single URL, it tries to get its MIME type from a HEAD
-request and matches on the URL and/or the MIME type to see if any more suitable
-programs could open it. Otherwise, it falls back on $BROWSER.
+just execs the program in the $BROWSER environment variable with the given
+arguments. That's it.
.P
-At the time of writing, it tries to load image types with feh(1), and YouTube
-URLs without a start time with mpv(1).
+It was written to have a clean way to launch $BROWSER from ~/.xbindkeysrc. It
+has no other reason to exist.
.SH SEE ALSO
-brxs(1), urlh(1), urlmt(1), feh(1), mpv(1)
+xgo(1), xgoc(1)
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>
diff --git a/man/man1/dmp.1 b/man/man1/dmp.1
index 2d9111d6..e9b5dc4f 100644
--- a/man/man1/dmp.1
+++ b/man/man1/dmp.1
@@ -1,15 +1,19 @@
-.TH DMP 1 "May 2014" "Manual page for dmp"
+.TH DMP 1 "August 2016" "Manual page for dmp"
.SH NAME
.B dmp
\- pick a pass(1) password with dmenu(1)
.SH SYNOPSIS
.B dmp
+.br
+.B dmp 25
.SH DESCRIPTION
.B dmp
-applies dmenu(1) to pick a password entry
-from a pass(1) store and put it into the X
-CLIPBOARD for up to 10 seconds.
+applies dmenu(1) to pick a password entry from a pass(1) store and put it into
+the X CLIPBOARD for up to 10 seconds.
+.P
+An optional timeout in seconds can be applied, after which xsel(1) will remove
+the password from the clipboard. This timeout defaults to 10 seconds.
.SH SEE ALSO
-dmenu(1), pass(1)
+dmenu(1), pass(1), xsel(1)
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>
diff --git a/man/man1/edda.1 b/man/man1/edda.1
index 21e6b163..3123c0ce 100644
--- a/man/man1/edda.1
+++ b/man/man1/edda.1
@@ -1,14 +1,14 @@
-.TH EDDA 1 "June 2015" "Manual page for edda"
+.TH EDDA 1 "August 2016" "Manual page for edda"
.SH NAME
.B edda
\- run ed(1) over multiple files
.SH SYNOPSIS
-.B edda [OPTS] [--] FILE1 [FILE2...]
+.B edda FILE1 [FILE2...]
.SH DESCRIPTION
-Duplicate any data on stdin into a temporary file, and run ed(1) with any given
-options over each of the files given as the remaining arguments. Example:
+Duplicate any data on stdin into a temporary file, and run ed(1) options over
+each of the files given as the remaining arguments. Example:
.P
- $ edda -s /etc/app.d/*.conf <<EOF
+ $ edda /etc/app.d/*.conf <<EOF
,s/foo/bar/g
w
EOF
diff --git a/man/man1/unf.1 b/man/man1/unf.1
index 709e7d2b..57d4548f 100644
--- a/man/man1/unf.1
+++ b/man/man1/unf.1
@@ -13,7 +13,7 @@ FILE
FILE1 FILE2...
.br
curl -I http://www.example.net/ |
-.B
+.B
unf
.SH DESCRIPTION
Joins lines with leading spaces in the output to the previous line,
diff --git a/man/man1/xgo.1 b/man/man1/xgo.1
index 13cbdd37..5eec6517 100644
--- a/man/man1/xgo.1
+++ b/man/man1/xgo.1
@@ -6,8 +6,12 @@
.B xgo
.SH DESCRIPTION
.B xgo
-examines each of its arguments and opens an appropriate program to view it,
-falling back on $BROWSER.
+examines each of its arguments, including making an HTTP HEAD request to try
+and get its MIME type, and then opens an appropriate program to view it,
+falling back on $BROWSER. The choices of application are very opinionated.
+.SH FUTURE
+There could probably be a MIME-type and/or URL-pattern to program configuration
+file, rather than hard-coding it.
.SH SEE ALSO
br(1), xgoc(1)
.SH AUTHOR