www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT 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 AT redhat DOT 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 AT cygwin DOT com |
Subject: | Re: Force "ls" to show .exe extension |
References: | <loom DOT 20150106T203355-631 AT post DOT gmane DOT org> <54AC48DE DOT 6000806 AT cygwin DOT com> <loom DOT 20150106T221646-526 AT post DOT gmane DOT org> <loom DOT 20150106T222234-870 AT post DOT gmane DOT org> |
In-Reply-To: | <loom.20150106T222234-870@post.gmane.org> |
OpenPGP: | url=http://people.redhat.com/eblake/eblake.gpg |
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--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |