Re: Little cygpath improvement request

2014-02-16 Thread Steven Penny
On Sun, Feb 16, 2014 at 7:07 PM, Andy Hall wrote > Goodness. If code cleanliness is the issue, Why not simply hide this construct > in a function? Really this whole thread is a joke. He needs to just cygpath -ml "$2" &>/dev/null as others have said and be done with it. -- Problem reports:

RE: Little cygpath improvement request

2014-02-16 Thread Andy Hall
> > On Sun, Feb 16, 2014 at 12:30 PM, Buchbinder, Barry (NIH/NIAID) [E] wrote > > if [ ! -z "$2" ] ; then NATIVE="$(cygpath -ml "$2")" ; fi > > That might better be written as this > > [ "$2" ] && NATIVE=$(cygpath -ml "$2") > > You do not need the extra quotes when setting a variable in thi

Re: Little cygpath improvement request

2014-02-16 Thread Steven Penny
On Sun, Feb 16, 2014 at 12:30 PM, Buchbinder, Barry (NIH/NIAID) [E] wrote > if [ ! -z "$2" ] ; then NATIVE="$(cygpath -ml "$2")" ; fi That might better be written as this [ "$2" ] && NATIVE=$(cygpath -ml "$2") You do not need the extra quotes when setting a variable in this way. -- Problem

Re: Little cygpath improvement request

2014-02-16 Thread Andrey Repin
Greetings, Corinna Vinschen! >> > 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??? >> >> Because the message serves no purpose in every use case I could think about. >> That, aside the fact it needs to create a redirecti

RE: Little cygpath improvement request

2014-02-16 Thread Buchbinder, Barry (NIH/NIAID) [E]
Corinna Vinschen sent the following at Sunday, February 16, 2014 10:11 AM >> > NATIVE=$(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. Some of us avoid redirectio

Re: Little cygpath improvement request

2014-02-16 Thread Corinna Vinschen
On Feb 16 18:41, Andrey Repin wrote: > Greetings, Corinna Vinschen! > > >> >> >> 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.

Re: Little cygpath improvement request

2014-02-16 Thread Andrey Repin
Greetings, Corinna Vinschen! >> >> >> 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 scr

Re: Little cygpath improvement request

2014-02-16 Thread Corinna Vinschen
On Feb 15 22:57, Andrey Repin wrote: > Greetings, Corinna Vinschen! > > >> >> 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. > >> >> Thi

Re: Little cygpath improvement request

2014-02-15 Thread Andrey Repin
Greetings, Larry Hall (Cygwin)! >> It provide no information at all in any event (be it missing argument, or >> nonexistent path (not like it's checking for existence right now... which >> only >> making situation more complicated)), requiring non-obvious, manually >> conceived >> tests to ensur

Re: Little cygpath improvement request

2014-02-15 Thread Larry Hall (Cygwin)
On 2/16/2014 1:21 AM, Andrey Repin wrote: It provide no information at all in any event (be it missing argument, or nonexistent path (not like it's checking for existence right now... which only making situation more complicated)), requiring non-obvious, manually conceived tests to ensure that

Re: Little cygpath improvement request

2014-02-15 Thread Andrey Repin
Greetings, m0viefreak! > I'm not exactly sure what you are trying to accomplish with that patch, > but it looks to me as if everything you want is already present: > cygpath --help > states > -i, --ignore ignore missing argument With "that patch", this option can be dropped altoge

Re: Little cygpath improvement request

2014-02-15 Thread Larry Hall (Cygwin)
On 2/16/2014 12:40 AM, m0viefreak wrote: I'm not exactly sure what you are trying to accomplish with that patch, but it looks to me as if everything you want is already present: cygpath --help states -i, --ignore ignore missing argument which outputs nothing if you pass it an e

Re: Little cygpath improvement request

2014-02-15 Thread m0viefreak
I'm not exactly sure what you are trying to accomplish with that patch, but it looks to me as if everything you want is already present: cygpath --help states -i, --ignore ignore missing argument which outputs nothing if you pass it an empty argument (or even without any further ar

Re: Little cygpath improvement request

2014-02-15 Thread Andrey Repin
Greetings, Corinna Vinschen! > P.S. > I've tried to rebuild it myself, but hit a roadblock. Had to get appropriately tired before I realized, what make tried to tell me. > make: *** No rule to make target > '/c/dev/sdc1/cygwin/build/winsup/cygwin/Makefile', needed by > '/c/dev/sdc1/cygwin/build/

Re: Little cygpath improvement request

2014-02-15 Thread Andrey Repin
Greetings, Corinna Vinschen! >> >> 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. >> >> > Why isn

Re: Little cygpath improvement request

2014-02-15 Thread Corinna Vinschen
On Feb 14 23:43, Andrey Repin wrote: > Greetings, Larry Hall (Cygwin)! > > > On 2/14/2014 1:22 PM, Andrey Repin wrote: > >> Greetings, All! > >> > >> I would like to request a small functional change for cygpath. > >> In the event of empty given path argument (i.e. `cygpath -ml ""') silently > >>

Re: Little cygpath improvement request

2014-02-14 Thread Andrey Repin
Greetings, Larry Hall (Cygwin)! > On 2/14/2014 1:22 PM, Andrey Repin wrote: >> Greetings, All! >> >> 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

Re: Little cygpath improvement request

2014-02-14 Thread Larry Hall (Cygwin)
On 2/14/2014 1:22 PM, Andrey Repin wrote: Greetings, All! 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. Why isn

Little cygpath improvement request

2014-02-14 Thread Andrey Repin
Greetings, All! 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. Sorry if this has been discussed already, google or