delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/10/16/23:03:26

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 <schulman DOT andrew AT epamail DOT epa DOT gov>
Subject: Re: Using nosleep with wrappers
Date: Tue, 16 Oct 2012 23:03:01 -0400
Lines: 38
Message-ID: <rn7s78hd96he4abi41asoaiabj9ovuvotr@4ax.com>
References: <507BE69D DOT 3080804 AT alice DOT it> <CAEhDDbDGjBCK2yRNigWvEwk6VZsLroe5X+JiS9SoiuZh_9BS8A AT mail DOT gmail DOT com>
Mime-Version: 1.0
X-Archive: encrypt
X-IsSubscribed: yes
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 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019