logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: f96bbd71f6d63d9bdb93a209408929165eeeebcd
parent 861cea5493bbadb8b9be3eb8b15b059cf42c2250
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 11 Mar 2025 08:26:39 +0100

cmd/base64: Add note about terminal line buffering

Bug: https://todo.sr.ht/~lanodan/utils-std/5

Diffstat:

Mcmd/base64.115+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/cmd/base64.1 b/cmd/base64.1 @@ -22,6 +22,21 @@ If no is given, .Nm reads from the standard input. +.Pp +.\" https://todo.sr.ht/~lanodan/utils-std/5 +Should be noted that the terminal-driver stdin buffering +can have a maximum amount of characters per line +(4096 on Linux, see +.Xr tcsetattr 3 Ns ). +So for copy-pasting large amounts of data you should either +pipe it from a command like +.Xr wl-paste 1 +or +.Xr xclip 1 , +or generate base64 data with a line length shorter +than the terminal driver buffer, +for example via: +.Dl Cm base64 -w $(tput cols) .Sh OPTIONS .Bl -tag -width _w_wrap .It Fl d