X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type; q=dns; s=default; b=ICDTxS
	+VDQuTWbUsGfYNF7R/ZkOI8pJS7jMjWNqMu8VZQ9Q8X70cYz4kYsgwT96G2DgoNM
	vhZXT8uuI5whl0BzNDI+h++MVbW5lKEkF4TXPOr6wGmp50TsZcXHyzpCQqKhYi6y
	TyMdsIKei0374AFqR77/eqSAR7JvJNjf+agwY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type; s=default; bh=fstGBp6zXuFr
	wtM6CMojUsWCsgw=; b=RIuIMlr9DA8Ldh0tuVd11v1eiZNoPQ/N14AnZ4z9+4jF
	IWzcL+6RBbx703EJ2Sp7EKX6QB70Rcf2UiOPtQjVhrH9JGwBrIPgy43oE5HLWfWf
	LWfnJKu4tpQ2q+UGa0bQa6rwenTp74F7n4BjnAsMYArPB4BWf4UMiAjQpoxhIvc=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: mx1.redhat.com
Message-ID: <54AC55DE.4090801@redhat.com>
Date: Tue, 06 Jan 2015 14:38:38 -0700
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Force "ls" to show .exe extension
References: <loom.20150106T203355-631@post.gmane.org> <54AC48DE.6000806@cygwin.com> <loom.20150106T221646-526@post.gmane.org> <loom.20150106T222234-870@post.gmane.org>
In-Reply-To: <loom.20150106T222234-870@post.gmane.org>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="plLFcqrAHW5s9OBaPtoVxFguubO3U14wf"
X-IsSubscribed: yes

--plLFcqrAHW5s9OBaPtoVxFguubO3U14wf
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 01/06/2015 02:28 PM, Paul wrote:
> Paul <Paul.Domaskis <at> gmail.com> writes:
>> Both solutions are great.  I'll set the --append-exe in my bash
>> aliases, and for systems outside of my normal working environment
>> (e.g., working with someone on their unix sessions), I know I can
>> force display of .exe using asterisk.
>=20
> Drat. If I pipe files to 'xargs ls', the unaliased ls command is used:
>=20
>    type -pa pdfcrop | xargs ls

alias xargs=3D'xargs '

Then the alias expansion of xargs will in turn allow alias expansion of
the next argument.  (Except that you then have to also create
trailing-space aliases for all options you commonly pass to xargs
between 'xargs' and the final command name).

Sadly, xargs is one of the cases where shell functions won't help (xargs
doesn't execute the shell function).  Your other solution is to modify
$PATH to point to a directory under your control as the first thing,
where 'cat /your/ls' contains:
#!/bin/sh
exec /bin/ls --append-exe "$@"

such that your script then gets picked up by xargs, and you no longer
have to worry about aliases.

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--plLFcqrAHW5s9OBaPtoVxFguubO3U14wf
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJUrFXeAAoJEKeha0olJ0NqcKgIAIHcNv9idp9oTAksfS9g4VVv
+UD7gEYdTKEo4MgQC5ntFR+gbs6VsrDo0V6M+1yPygMRI+Z+Wg3Cra2CNNi7dfWv
11+c/Oe1msPJrRtm8WrKUbQmArMSmychriydbaygdjp5VMxwqiC1nrHD89k9F81n
KTe6PlR3HUjisjPAHe0ZNp3FkUUESSNSgfZsRhqz2lsf276P2DD4aJD9/LKj9wZ9
jGNzr5nJkIeYOlOnjYIQw+OEfDoOmLcgsEub31ZNititnlJ+YffIpq2tdIW0+lTm
SfYXrugMOlorKBDzwdRQ48HdCgMMjaU9enbUhopSCndl5w2YB+9VrK8BWESdRxQ=
=88Op
-----END PGP SIGNATURE-----

--plLFcqrAHW5s9OBaPtoVxFguubO3U14wf--
