Little cygpath improvement request

Corinna Vinschen corinna-cygwin@cygwin.com
Sat Feb 15 13:06:00 GMT 2014


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
> >> return an empty result without error message.
> >> This would greatly simplify wrapper scripts.
> 
> > Why isn't redirecting the message to /dev/null not sufficient, something
> > like this (bash syntax)?
> 
> Because it'll require creating a redirection? And this kind of redundant
> inserts blurring the code.
> Returning a non-zero exit code would suffice for debugging purposes.
> 
> > cygpath -ml ""  >/dev/null 2&>1
> 
> Err, not > /dev/null !!! :D

  dos_path=$( [ -n "${posix_path}" ] && cygpath -ml "${posix_path}" )

?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140215/f067b864/attachment.sig>


More information about the Cygwin mailing list