Tue, Oct 4 2005
11:50:08
|
|
Request created by guest
|
|
Subject: d.m - store commands in the history
Platform: GNU/Linux/i386
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: cvs 07.09.2005
Commands called from the d.m are not stored in the Grass history. Would it be
possible to store them? I think it would be very usefull, anybody too?
Cheers,
Maciek |
|
Wed, Oct 5 2005
02:29:20
|
|
Mail sent by glynn@gclements.plus.com
|
|
Return-Path |
<glynn@gclements.plus.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
From |
Glynn Clements <glynn@gclements.plus.com>
|
MIME-Version |
1.0
|
Content-Type |
text/plain; charset=us-ascii
|
Content-Transfer-Encoding |
7bit
|
Message-ID |
<17219.7772.309426.963726@cerise.gclements.plus.com>
|
Date |
Wed, 5 Oct 2005 01:29:16 +0100
|
To |
Request Tracker <grass-bugs@intevation.de>
|
Cc |
grass5@grass.itc.it
|
Subject |
Re: [GRASS5] [bug #3710] (grass) d.m - store commands in the history
|
In-Reply-To |
<20051004095008.77B441005A3@lists.intevation.de>
|
References |
<20051004095008.77B441005A3@lists.intevation.de>
|
X-Mailer |
VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
Request Tracker wrote:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=3710
> -------------------------------------------------------------------------
>
> Subject: d.m - store commands in the history
>
> Commands called from the d.m are not stored in the Grass history.
> Would it be possible to store them? I think it would be very
> usefull, anybody too?
Are you referring to ~/.bash_history (and similar)? Those files belong
to the shell; d.m shouldn't be messing with them.
Arguably d.m should have its own command history, but that's a
separate issue.
--
Glynn Clements <glynn@gclements.plus.com>
|
|
Fri, Oct 7 2005
16:49:08
|
|
Mail sent by mneteler
|
|
Glynn wrote:
> Are you referring to ~/.bash_history (and similar)? Those files belong
> to the shell; d.m shouldn't be messing with them.
I guess that he refers to $MAPSET/.bash_history where d.m IMHO could
add commands without too many problems.
Markus |
|
Fri, Oct 7 2005
22:25:46
|
|
Mail sent by werchowyna@epf.pl
|
|
Return-Path |
<werchowyna@epf.pl>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Message-ID |
<000901c5cb7d$0cbed270$c4e41d3e@eustahiush>
|
From |
"Maciek Sieczka" <werchowyna@epf.pl>
|
To |
"Markus Neteler via RT" <grass-bugs@intevation.de>
|
Cc |
"grass devel" <grass5@grass.itc.it>, "Glynn Clements" <glynn@gclements.plus.com>
|
References |
<20051007144908.2F75C100179@lists.intevation.de>
|
Subject |
Re: [GRASS5] [bug #3710] (grass) d.m - store commands in the history
|
Date |
Fri, 7 Oct 2005 22:21:17 +0200
|
MIME-Version |
1.0
|
Content-Type |
text/plain; format=flowed; charset="iso-8859-2"; reply-type=original
|
Content-Transfer-Encoding |
7bit
|
X-Priority |
3
|
X-MSMail-Priority |
Normal
|
X-Mailer |
Microsoft Outlook Express 6.00.2900.2180
|
X-MimeOLE |
Produced By Microsoft MimeOLE V6.00.2900.2180
|
X-Antivirus |
avast! (VPS 0528-4, 2005-07-14), Outbound message
|
X-Antivirus-Status |
Clean
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
Glynn wrote:
>> Are you referring to ~/.bash_history (and similar)? Those files belong
>> to the shell; d.m shouldn't be messing with them.
Markus wrote :
> I guess that he refers to $MAPSET/.bash_history where d.m IMHO could
> add commands without too many problems.
Yes, that's what I refer to. Sorry I couldn't reply earlier.
It is a shame the user can't get back to commands which were issued from
GUI. Any chances?
Maciek
--------------------
W polskim Internecie są setki milionów stron. My przekazujemy Tobie tylko najlepsze
z nich!
http://katalog.epf.pl/
|
|
Sat, Oct 8 2005
11:59:28
|
|
Mail sent by glynn@gclements.plus.com
|
|
Return-Path |
<glynn@gclements.plus.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
From |
Glynn Clements <glynn@gclements.plus.com>
|
MIME-Version |
1.0
|
Content-Type |
text/plain; charset=us-ascii
|
Content-Transfer-Encoding |
7bit
|
Message-ID |
<17223.39036.36915.612218@cerise.gclements.plus.com>
|
Date |
Sat, 8 Oct 2005 10:59:24 +0100
|
To |
Markus Neteler via RT <grass-bugs@intevation.de>
|
Cc |
werchowyna@epf.pl, grass5@grass.itc.it
|
Subject |
Re: [GRASS5] [bug #3710] (grass) d.m - store commands in the history
|
In-Reply-To |
<20051007144908.2F75C100179@lists.intevation.de>
|
References |
<20051007144908.2F75C100179@lists.intevation.de>
|
X-Mailer |
VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
Markus Neteler via RT wrote:
> > Are you referring to ~/.bash_history (and similar)? Those files belong
> > to the shell; d.m shouldn't be messing with them.
>
> I guess that he refers to $MAPSET/.bash_history where d.m IMHO could
> add commands without too many problems.
It isn't quite that simple.
1. Changes to the history file won't effect existing processes unless
you force them to re-read the history file with "history -r".
2. bash doesn't simply append commands to the history file as they are
entered. It writes out the history in one go upon termination (or when
forced with "history -w"). So, commands appended to the file by
another process won't appear in the "right" place in the history.
3. Multiple shells can use the same history file; different shells
will read commands from different offsets in the file. E.g. if you
have three shells running, quit them, start 3 new shells, each new
shell will start where one of the others left off in terms of their
history.
4. d.m doesn't use a shell; it uses Tcl's "exec" command. A shell
command is a string, while a Tcl's exec command takes a list of
strings. Tcl would have to generate an equivalent shell command
according to the syntax rules for the shell (which might not be bash).
--
Glynn Clements <glynn@gclements.plus.com>
|
|
Sat, Oct 8 2005
18:45:29
|
|
Mail sent by michael.barton@asu.edu
|
|
Return-Path |
<Michael.Barton@asu.edu>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Date |
Sat, 08 Oct 2005 09:44:33 -0700
|
From |
Michael Barton <michael.barton@asu.edu>
|
Subject |
Re: [GRASS5] [bug #3710] (grass) d.m - store commands in the history
|
In-reply-to |
<17223.39036.36915.612218@cerise.gclements.plus.com>
|
To |
Glynn Clements <glynn@gclements.plus.com>, Paolo Cavallini via RT <grass-bugs@intevation.de>
|
Cc |
werchowyna@epf.pl, grass5@grass.itc.it
|
Message-id |
<BF6D4581.3702%michael.barton@asu.edu>
|
MIME-version |
1.0
|
Content-type |
text/plain; charset=US-ASCII
|
Content-transfer-encoding |
7bit
|
User-Agent |
Microsoft-Entourage/11.2.0.050811
|
Thread-Topic |
[GRASS5] [bug #3710] (grass) d.m - store commands in the history
|
Thread-Index |
AcXMJ49OzggtUTgaEdqz7wAKlW/i4A==
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
Although the d.m layers don't write to the command history upon display,
they CAN be saved as a "group". This group can then be opened in the future,
reinitializing all the saved GIS Manager layers.
To get the commands to save to the command history, you'd need to write a
shell script with the same commands. This is pretty easy because, when you
push the display button, all the commands get written to the terminal. From
there, you can cut and paste them into a shell script--or just to the
terminal one by one to populate the command history.
As with many things in GRASS, if you can't do it one way, there are a couple
other alternative methods to achieve the same or similar results.
Hope this is helpful.
Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
> From: Glynn Clements <glynn@gclements.plus.com>
> Date: Sat, 8 Oct 2005 10:59:24 +0100
> To: Markus Neteler via RT <grass-bugs@intevation.de>
> Cc: <werchowyna@epf.pl>, <grass5@grass.itc.it>
> Subject: Re: [GRASS5] [bug #3710] (grass) d.m - store commands in the history
>
>
> Markus Neteler via RT wrote:
>
>>> Are you referring to ~/.bash_history (and similar)? Those files belong
>>> to the shell; d.m shouldn't be messing with them.
>>
>> I guess that he refers to $MAPSET/.bash_history where d.m IMHO could
>> add commands without too many problems.
>
> It isn't quite that simple.
>
> 1. Changes to the history file won't effect existing processes unless
> you force them to re-read the history file with "history -r".
>
> 2. bash doesn't simply append commands to the history file as they are
> entered. It writes out the history in one go upon termination (or when
> forced with "history -w"). So, commands appended to the file by
> another process won't appear in the "right" place in the history.
>
> 3. Multiple shells can use the same history file; different shells
> will read commands from different offsets in the file. E.g. if you
> have three shells running, quit them, start 3 new shells, each new
> shell will start where one of the others left off in terms of their
> history.
>
> 4. d.m doesn't use a shell; it uses Tcl's "exec" command. A shell
> command is a string, while a Tcl's exec command takes a list of
> strings. Tcl would have to generate an equivalent shell command
> according to the syntax rules for the shell (which might not be bash).
>
> --
> Glynn Clements <glynn@gclements.plus.com>
>
>
>
|
|
Mon, Oct 10 2005
15:47:03
|
|
Subject changed to store GUI commands in Grass history - same as CLI by msieczka
|
|
Mon, Oct 10 2005
15:51:22
|
|
Mail sent by msieczka
|
|
First of all - I'm changing the subject so it reflects what I mean better.
Sorry for missunderstanding. Please read below.
Michael Barton wrote:
> Although the d.m layers don't write to the command history upon display,they
> CAN be saved as a "group".
I don't mean to store the d.m layer-command into history, only the command
invoked from GUI.
I mean this, eg.: I call v.out.ogr&, GUI pops up, I select options, execute
and the full command syntax is stored in the Grass history - like if I called
the command from CLI.
Glynn, does this change anything? Do the limitations for d.m layer commands
you described apply to Grass commands invoked from their GUIs too? Or could
they be stored in Grass history easier than d.m commands?
> To get the commands to save to the command history, you'd need to write a
> shell script with the same commands. This is pretty easy because, when you
> push the display button, all the commands get written to the terminal.
When talking of this - it is an annoying feature actually IMO. d.m should not
mess with main Grass terminal. Grass terminal should be left for CLI only if
possible.
Maciek |
|
Thu, Oct 13 2005
18:54:54
|
|
Mail sent by glynn@gclements.plus.com
|
|
Return-Path |
<glynn@gclements.plus.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
From |
Glynn Clements <glynn@gclements.plus.com>
|
MIME-Version |
1.0
|
Content-Type |
text/plain; charset=us-ascii
|
Content-Transfer-Encoding |
7bit
|
Message-ID |
<17230.37205.113787.122527@cerise.gclements.plus.com>
|
Date |
Thu, 13 Oct 2005 17:54:45 +0100
|
To |
Maciek Sieczka via RT <grass-bugs@intevation.de>
|
Cc |
grass5@grass.itc.it, michael.barton@asu.edu
|
Subject |
Re: [GRASS5] [bug #3710] (grass) store GUI commands in Grass history - same as CLI
|
In-Reply-To |
<20051010135122.BD8501005C6@lists.intevation.de>
|
References |
<20051010135122.BD8501005C6@lists.intevation.de>
|
X-Mailer |
VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
Maciek Sieczka via RT wrote:
> First of all - I'm changing the subject so it reflects what I mean better.
> Sorry for missunderstanding. Please read below.
>
> Michael Barton wrote:
>
> > Although the d.m layers don't write to the command history upon display,they
> > CAN be saved as a "group".
>
> I don't mean to store the d.m layer-command into history, only the command
> invoked from GUI.
>
> I mean this, eg.: I call v.out.ogr&, GUI pops up, I select options, execute
> and the full command syntax is stored in the Grass history - like if I called
> the command from CLI.
>
> Glynn, does this change anything? Do the limitations for d.m layer commands
> you described apply to Grass commands invoked from their GUIs too?
Yes.
> Or could they be stored in Grass history easier than d.m commands?
It's problematic for anything other than the shell itself to write to
its history file.
> > To get the commands to save to the command history, you'd need to write a
> > shell script with the same commands. This is pretty easy because, when you
> > push the display button, all the commands get written to the terminal.
>
> When talking of this - it is an annoying feature actually IMO. d.m should not
> mess with main Grass terminal. Grass terminal should be left for CLI only if
> possible.
It isn't d.m that's doing it, but the commands which it runs. By
default, processes inherit their standard output from their parent, so
if you start d.m from an xterm, then d.m runs some commands, those
commands will use the xterm for their output.
It would be trivial for d.m to redirect the output elsewhere; the
issue is in deciding where. Or the user can redirect the output
themself, e.g.
d.m &> out.log & # all output to a file
or
xterm -e d.m & # all output to a new xterm
--
Glynn Clements <glynn@gclements.plus.com>
|
|
Wed, Jul 26 2006
16:49:24
|
|
User changed to tutey@o2.pl by msieczka
|
|