X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Andrew Schulman Subject: Re: Using nosleep with wrappers Date: Tue, 16 Oct 2012 23:03:01 -0400 Lines: 38 Message-ID: References: <507BE69D DOT 3080804 AT alice DOT it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive: encrypt 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 > On Mon, Oct 15, 2012 at 12:34 PM, Angelo Graziosi wrote: > > In my .bashrc I have something like this: > > > > xf() > > { > > LANG=''\ > > /usr/bin/xfig -specialtext -latexfonts -startlatexFont default \ > > "$@" 2>/dev/null > > } > > > > but, trying > > > > $ nosleep xf > > nosleep: Error: failed to execute command: xf > > > > The same occurs for > > > > picasa() > > { > > TEMP=/home/$USER/Temp TMP=/home/$USER/Temp \ > > cyg-wrapper.sh "/WinXP/Programmi/Google/Picasa3/Picasa3.exe" \ > > "$@" 2>/dev/null > > } > > > > > > Is there some tricks to have nosleep working with wrappers like the above? > > Hi Angelo, > You'll probably have to invoke bash explicitly; something like this (not tested) > > nosleep bash -c xf Right. nosleep will run a command, which has to be an executable file that lives somewhere in your PATH. You're trying to use nosleep to run functions, which are internal objects in bash. Csaba's suggestion may work. Or, you could put the commands into separate bash scripts that live in your PATH. -- 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