Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <3EC1A7A6.7020504@kleckner.net> Date: Tue, 13 May 2003 19:19:18 -0700 From: Jim Kleckner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 X-Accept-Language: en-us MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Does cygstart always expand arguments? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Igor Pechtchanski wrote: > On Tue, 13 May 2003, Jim Kleckner wrote: ... > FYI, the following works for me: > > cygstart gvim '"file with spaces.txt"' '"another file with spaces.txt"' Yep, you did it, thanks! A gold star for you, though definitely not as valuable as cgf's. Another case of peeling off layers of "quoting the quotes". There must be some DOS shell buried in there as part of the invocation or something. If anyone cares, here is a small bash snippet that will create either a shell alias or a function to figure out which version of gvim/vim/vimx/vi is available to use. Note the use of quotes as supplied by Igor on the line with cygpath. I'm sure someone out there can simplify the for loop. === bash snippet to determine vim/vi # To use this type: # v [list of files to edit] alias which="type -path" if [ "$OSTYPE" != "cygwin" ] ; then if [ "`which vimx`" != "" ] ; then alias v=vimx elif [ "`which vim`" != "" ] ; then alias v=vim else alias v=vi fi else if [ "`which gvim`" != "" ] ; then function v() { unset _fs _i=0 for _f in "$@"; do _fs[$_i]='"'`cygpath -m "$_f"`'"' let _i=$_i+1 done cygstart gvim.exe ${_fs[@]} } elif [ "`which vimx`" != "" ] ; then alias v=vimx elif [ "`which vim`" != "" ] ; then alias v=vim else alias v=vi fi fi -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/