Regularize shift $((OPTIND - 1)) after getopts

2023-08-30 Thread Simon Branch
Hello tech@, In an arithmetic substitution -- that is, the $(( ... )) construct in a shell script -- one can reference variables either with ($a) or without (a) the dollar sign. However, the latter is slightly better: the variable is interpreted as an integer, and then the integer is used inside

mg.1: add no-tab-mode to set-default-mode description

2023-06-27 Thread Simon Branch
Hello! I've been enjoying the resurrection of no-tab-mode in mg(1). It is simple to enable by default: set-default-mode notab The manual page says that "built in modes include fill, indent and overwrite". This patch makes the list more complete by adding notab, and adds "can be set globally

Explicitly tag commands in vi(1)

2021-11-20 Thread Simon Branch
Hello! Here's a diff that adds explicit .Tg macros to vi(1), so that you can jump to vi or ex commands using -Otag or :t. This patch *should* include every command, but I couldn't figure out how to tag the '!' and ':!' commands; none of these worked: .Tg .Tg ! .Tg !\& .Tg "!" This p

Add missing .Dv in termios(4)

2021-11-09 Thread Simon Branch
Simple change to format this sentence correctly in non-terminal environments. diff --git share/man/man4/termios.4 share/man/man4/termios.4 index dfb7609dd6f..89818ca46c2 100644 --- share/man/man4/termios.4 +++ share/man/man4/termios.4 @@ -1011,7 +1011,7 @@ overflowing the input queue. The precise

Re: Document when fileno(3) returns -1

2021-10-29 Thread Simon Branch
On Fri, Oct 29, 2021 at 04:17:18PM -0700, Simon Branch wrote: > Here's a simple patch that describes ferror(3)'s error conditions. Feel free > to > change the wording to be more consistent with OpenBSD conventions; for > example, > I wasn't sure whether to us

Document when fileno(3) returns -1

2021-10-29 Thread Simon Branch
Here's a simple patch that describes ferror(3)'s error conditions. Feel free to change the wording to be more consistent with OpenBSD conventions; for example, I wasn't sure whether to use .St when talking about POSIX, since 'IEEE Std 1003.1-2008 ("POSIX.1")' seemed a little long for the main text