X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Jay Subject: Re: need help with bash -c with cygpath Date: Wed, 9 Jan 2008 14:13:15 +0000 (UTC) Lines: 31 Message-ID: References: <47845595 DOT 5040406 AT byu DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 > Whoa - it seldom makes sense to use -i and -c simultaneously - what good What i'm actually trying to do is have a right-click menu in windows so that when i right click on a file i can choose head from the context menu, and it will send the top 10 lines of the file to vim. I have gvim (windows version) aliased in my .bashrc so that's why i'm using the -i switch. What i have done is created the following registry key: [HKEY_CLASSES_ROOT\*\shell\Head\Command] with the (default) value set to: C:\CYGWIN\bin\bash -i -c "head $(cygpath -a '%1') | vim -R -" This works perfectly for local files, but does not work at all for network shares via UNCs due to the problem stated earlier. > bash -c "cygpath -a '"'\\uncpath\mydrive$'\' This works! but i can't figure out how to make it work for this scenario bash -i -c "head $(cygpath -a "'\\gandy1\rjapps$\Subsidiarypayroll\Web.config'"')" Maybe i have the quotes messed up, or maybe i'm going about doing this all wrong. > By the way, none of this tutorial on shell quoting is cygwin specific. Thanks again for the help. -- 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/