Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Help find Zsh' Bash `read -N1 -p "Put here " var
On Tue, Aug 22, 2023 at 03:34:18PM +0000, Ellenor Bjornsdottir wrote:
> The snarky comments aren't well appreciated, zeurkous. Please don't chastise people for thinking GPT can do things it can't.
>
> OP, GPT can't help you understand or accomplish this task. It's just a language model and it doesn't actually understand anything. It's been missold as this super app that knows everything.
>
> What are you trying to do? Are you trying to read a single character from std. input into ${var}? (I opened the Bash operator's handbook to page... this thing https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html and that looks to be what you were trying to do)
>
> If I open `man zshbuiltins` and scroll down to the info for the `read` command I am told I can pass -k and a number to `read`. I think someone in this thread already mentioned that, without explaining how they got that.
> --
> Ellenor Bjornsdottir (she)
> sysadmin umbrellix.net
A little tip that may help with finding the documentation for zsh
built-ins:
if ((${+aliases[run-help]})); then unalias run-help; fi
autoload -Uz run-help
This will make the run-help command available, which will present the
manual page for the command that you give it as an argument (including
the correct documentation for zsh built-ins). According to the run-help
source code: "Figure out where to get the best help, and get it."
--
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden
.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author