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

Re: Slurping a file



On Tue, Jan 16, 2024 at 9:08 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
>
> On 2024-01-16 11:57, Bart Schaefer wrote:
> > On Mon, Jan 15, 2024 at 12:53 AM Roman Perepelitsa
> > <roman.perepelitsa@xxxxxxxxx> wrote:
> >> Perhaps zslurp?
> > Sure.  I was going to suggest "zlurp" but it looks odder written down
> > than thought about.
> Nothing wrong with something light-hearted just so long as it's
> intuitive what it does.  'zlurp' is a bridge too far IMHO.  The thing
> makes an exact copy, what's the word for that?  Sorta why I liked 'xact'
> or 'xcopy' -- but that's taken, so 'zcopy'.

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 to go along with zstat, zselect, zcalc, etc. Note
that it's zstat and zselect and not ztat and zelect, hence zslurp and
not zlurp.

Roman.

P.S.

When I see "xcopy", I also know what it does but it's unrelated. Also,
"copy" for a file is a very different operation.




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