Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Slurping a file



On Tue, Jan 16, 2024 at 9:38 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> On 2024-01-16 12:14, Roman Perepelitsa wrote:
>
> When I see "slurp", I know exactly what it does: reads a full file
>
> into a string. If you don't get the same immediate reaction, you
> really should: google "file slurp" and see that it's the way this
> facility is called in many programming languages.
>
> Now that "slurp" is taken by an unrelated command, "zslurp" is an
> obvious alternative
>
> So it is.  Not 'zlurp' but 'zslurp' -- that fixes it.  Besides, it's your baby and you should make the call.

I cannot take credit for it. The implementation is trivial and given
my late arrival to zsh I'm sure there are many implementations that do
the same thing already, likely even by the same name. That said, even
they didn't invent anything of importance: it really is a trivial
thing.

Roman.




Messages sorted by: Reverse Date, Date, Thread, Author