| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| 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 <jek_subs AT kleckner DOT net> |
| 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: | <Pine DOT GSO DOT 4 DOT 44 DOT 0305131935510 DOT 17480-100000 AT slinky DOT cs DOT nyu DOT edu> |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |