This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygpath -s behaviour


Simon,

You can probably guess without looking at the source that all cygpath is
doing is interfacing with Windows. Sure, it would be possible to add an 
option to do what you're asking, but it would be a kludge. If you really
think it's necessary, take a look at the cygpath source and make a patch. 

http://cygwin.com/contrib.html

Personally, I'd wrap it in a script and just enclose cygpath output in quotes
to avoid problems with spaces.

"Watts, Simon (UK)" <swatts@northgrum-it.eu.com> wrote:
> Just spend a merry lunchtime tracking this behaviour down (it would be cruel
> to call it a bug):
>
> Recap:
>       cygpath -[mw]s "DIR"
> echos the file/directory DIR in shortened windows format (ie, mangles to 8.3
> format).
>
> If a component part of "DIR" is not in 8.3 format, and does not exist in the
> directory structure, then (I presume) 'cygpath' cannot obtain the mangled
> form.  The upshot is that cygpath returns nothing.  It may set an error
> state, I havent checked.
>
> It would be useful if this was mentioned in the man page or '--help'.
>
> Is there any more useful behaviour?  All I am really trying to do in using
> the '-s' option is to mangle any componts of the path containing spaces
> (writing cross-platform scripts here...).
>
> What about an option to mangle only those elements of a path which (a) exist
> and (b) contain spaces?


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]