sed(1): a,i,c text escape leading whitespace

2023-09-13 Thread Luka Krmpotić
Hello, I've noticed a bug with whitespace indentation in sed. Summary: For a,i,c `text` the leading whitespace that is intended to stay in output should be escaped, or else be ignored. The latter is not the case for sed(1) - it includes leading whitespace of `text` in the output, even if it is

tr(1): don't use indirect variable, supplement comment

2023-06-20 Thread Luka Krmpotić
Hello, I suggest this simplification in the "tr [-Ccs] string1 string2" section of main. It makes it easier to understand what's happening in the -C case. Luka diff --git a/usr.bin/tr/tr.c b/usr.bin/tr/tr.c index ab78898a986..a47fb409f34 100644 --- a/usr.bin/tr/tr.c +++ b/usr.bin/tr/tr.c @@

man sed(1): instructions wrt whitespace in functions

2022-09-14 Thread Luka Krmpotić
section "DESCRIPTION" of sed man(1) page, says >The form of a sed command is as follows: >[address[,address]]function[arguments] >Whitespace may be inserted before the first address and the function >portions of the command.

man sed(1), fix comment about two addresses

2022-09-13 Thread Luka Krmpotić
sed's man(1) page, section "sed addresses", has a note: https://github.com/openbsd/src/blob/16748403c325ab5b4e9457bf8f0879a6698daba9/usr.bin/sed/sed.1#L175-L176 > (If the second address is a number less than or equal to the line number first selected, only that line is selected.) to me, this

man sh(1), fix explanation for `shift`

2022-08-31 Thread Luka Krmpotić
In sh(1) manpage, this sentence explaining how shift builtin works: > Parameters ‘#’ to ‘(#−n)+1’ and downwards are unset and ‘#’ is updated to the new number of positional parameters. can be made clearer by removing "and downwards" diff --git bin/ksh/sh.1 bin/ksh/sh.1 index