[GRASS5] [bug #3710] (grass) store GUI commands in Grass history - same as CLI

Glynn Clements glynn at gclements.plus.com
Thu Oct 13 12:54:45 EDT 2005


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 at gclements.plus.com>




More information about the grass-dev mailing list