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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=VRTP5lvcqbJU5zsUk4T8lwcXtmLBAZ9wdjMfLSN4xGRxYucgqE5II oHMHVTktD/Xh4O0aSJUAe+uAKBC1zo4jGj94fn9fpPeRl4ZfMKQ01sYJNXzoBEWX Cu/REgU90h7a26U78Z2PQN9Z6E4iIHVWPnQ99uplATY3e9pvNx9MK8= 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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=AYqYMdcDoJCEeUp6DeSrPUddvWE=; b=kOcXxEHnQJp2OK9K1x/HdSrqm9wL lQCvjOg0MO6e1RwKvHJBJE+YQA0AC9/Gi/j9xmKMDXT0eT7dmNTdFtEjnidu6MGr PvfaUb38W4rQ96zwVN9blzIzWGz5I62TT1AWP+/wUT8SukSqMrUSL6MVZzr4PGRH xCX/CVG2q2zkKuA= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-6.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Date: Sun, 16 Feb 2014 16:11:07 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Little cygpath improvement request Message-ID: <20140216151107.GT2246@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <111910987 DOT 20140214222230 AT mtu-net DOT ru> <52FE6397 DOT 5010105 AT cygwin DOT com> <187072112 DOT 20140214234339 AT mtu-net DOT ru> <20140215125606 DOT GM2246 AT calimero DOT vinschen DOT de> <1745533059 DOT 20140215225708 AT mtu-net DOT ru> <20140216120042 DOT GP2246 AT calimero DOT vinschen DOT de> <40596392 DOT 20140216184131 AT yandex DOT ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UkA0xnprSsTJHodh" Content-Disposition: inline In-Reply-To: <40596392.20140216184131@yandex.ru> User-Agent: Mutt/1.5.21 (2010-09-15) --UkA0xnprSsTJHodh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Feb 16 18:41, Andrey Repin wrote: > Greetings, Corinna Vinschen! >=20 > >> >> >> I would like to request a small functional change for cygpath. > >> >> >> In the event of empty given path argument (i.e. `cygpath -ml ""'= ) silently > >> >> >> return an empty result without error message. > >> >> >> This would greatly simplify wrapper scripts. > >> >>=20 > >> >> > Why isn't redirecting the message to /dev/null not sufficient, so= mething > >> >> > like this (bash syntax)? > >> >>=20 > >> >> Because it'll require creating a redirection? And this kind of redu= ndant > >> >> inserts blurring the code. > >> >> Returning a non-zero exit code would suffice for debugging purposes. > >> >>=20 > >> >> > cygpath -ml "" >/dev/null 2&>1 > >> >>=20 > >> >> Err, not > /dev/null !!! :D > >>=20 > >> > dos_path=3D$( [ -n "${posix_path}" ] && cygpath -ml "${posix_path}= " ) > >>=20 > >> > ? > >>=20 > >> I appreciate the effort, bit this even MORE complicating the possible = use > >> case. > >>=20 > >> Look, I'm asking for simplification without loosing functionality. > >> If I NEED to check the path for existence, I would write something to = the > >> extent of >=20 > > I'm getting a bit puzzled. If it's only the message you don't want, > > then why not just send this message to /dev/null??? >=20 > Because the message serves no purpose in every use case I could think abo= ut. > That, aside the fact it needs to create a redirection. >=20 > > NATIVE=3D$(cygpath -ml "$2" 2>/dev/null) And what's the problem with redirections? I fail to see the big difference between adding a redirection compared to adding an option character. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --UkA0xnprSsTJHodh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTANULAAoJEPU2Bp2uRE+g8SoP/jl82m1Bd2+KqKJ4OYikm+Yj OLCJLVTmuy7AWn581Cttw6cls/gcpJ2f85x+FqHR2hj/pu5eAOjVnQ5MVsMX2dTi ZYRks8y4bcRkCyfdYzh8OWidb5s4Uwx8qMzGaHxBd2wAHxhkABTiVLN2OFlIfDtg OhmY95MRaqb6XdfImcTUC1MKs0gDRAJ77bgbxULdectMECrhJgHGddzKoahaLKWs GqwPvsIG4LCCedNbIQCTmrKndVMw+FNOi9y7k7j+ykB2Wy5abObnOONZdFINwo3D o4vj6vI7XLtK/zpq/0iJs2d1G+2mMLUIjXrUaLNI9szjfJ4hJikpDy1GbxR3CLcY JB1D+fPDKp/7Lz7gg9xAwI6OfI3phYXCd2aTG0imUi1IHHj/7TslflwrHB7faGge OAvFkKY2invxNHcvmTR89r/aaH4FHbxiRY/cCBynILHgyS7qEfKlyrFr6YetRkJt 3x5aYyFC/VSwO6IDJ9/CpygbkhoiuWp6EqfRNPRhXIJNuVH/GT+ynxAKT2PpqJml MWOmcJcOaFZfwiA8YBJRIY1L64d1z9fZ6BeJ3nVTvtmLbnscKQnuCjbru9suBnBS RS/gKc4+ePCyWu8CwkcHMgwbdY8IhHzLAImpG7uzc5FlvOB2jA3bstFizswuwPeJ vzobSkaqempZuP8wBvRP =U6O/ -----END PGP SIGNATURE----- --UkA0xnprSsTJHodh--