zsh-users
 help / color / mirror / code / Atom feed
From: Perry Smith <pedz@easesoftware.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: Looking for sage advice
Date: Mon, 15 Aug 2022 16:47:47 -0500	[thread overview]
Message-ID: <14DE1394-B69C-4702-B438-45B511202362@easesoftware.com> (raw)
In-Reply-To: <CAMP44s2Zrz0o=eed-uFbuartgYAv1Cc=cKh=xhb5-H9pUu0=NA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 935 bytes --]



> On Aug 15, 2022, at 16:42, Felipe Contreras <felipe.contreras@gmail.com> wrote:
> 
> On Mon, Aug 15, 2022 at 4:04 PM Perry Smith <pedz@easesoftware.com> wrote:
>> 
>> I want to write “something” that effectively does
>> 
>> function xlargs
>> {
>>  tr ‘\n’ ‘\0’ | xargs -0 $*
>> }
>> 
>> 
>> Would you recommend doing this as an autoload function or as an alias?  The reason I ask is because back when I used bash and something called rvm, all of my aliases proved to be a horrible wrench for their bash shell scripts.  So I’ve sorta sworn off of aliases but I’m wondering if that is imprudent.
> 
> If you are doing multiple commands I would do a function, but I wonder
> what's the point of this when you can do: xargs -d '\n' $*

Thank you.

It appears that neither macOS nor Free BSD have the -d option.  I see it in the Linux documentation but, yes, that is exactly what I’m needing.


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-08-15 21:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15 21:02 Perry Smith
2022-08-15 21:42 ` Felipe Contreras
2022-08-15 21:47   ` Perry Smith [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14DE1394-B69C-4702-B438-45B511202362@easesoftware.com \
    --to=pedz@easesoftware.com \
    --cc=felipe.contreras@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).