delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=3.6 required=5.0 tests=AWL,BAYES_40,BOTNET,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE |
X-Spam-Check-By: | sourceware.org |
Message-id: | <4FE21D0B.7010409@cygwin.com> |
Date: | Wed, 20 Jun 2012 14:57:15 -0400 |
From: | "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com> |
Reply-to: | cygwin AT cygwin DOT com |
User-Agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 |
MIME-version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: A little annoiance after modifying my .bashrc file to add an alias to edit files |
References: | <jrt43g$d3f$1 AT dough DOT gmane DOT org> |
In-reply-to: | <jrt43g$d3f$1@dough.gmane.org> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
On 6/20/2012 2:13 PM, gialloporpora wrote: > Hi all, > I have found this good tip: > http://www.mikaelkrok.net/component/content/article/44-java/131-use-cygwin-with-your-best-external-windows-text-editor > > to use my Windows text editor to modify files. > I have added this line to my .bashrc file: > alias edit="cygstart /cygdrive/c/Programmi/Crimson\ Editor/cedt.exe > "$(cygpath -w "$1")"" > I have only an annoiance, not a real problem, only an annoiance: when I > start the Cygwin shell and it loads the .bashrc file, it is shown this message: > cygpath: can't convert empty path > > Is it possible to hide it without removing the tip? I'm curious why you query the list for help instead of your original source. That notwithstanding, the reason you see this is because the alias you found and are using is wrong. From the bash man page: There is no mechanism for using arguments in the replacement text. If arguments are needed, a shell function should be used (see FUNCTIONS below). The alias you pulled from the web tries to work-around this restriction, without much success (not surprisingly). Use a function something like this: edit () { cygstart "/cygdrive/c/Programmi/Crimson\ Editor/cedt.exe" $(cygpath -w "$*") } -- Larry _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |