Opened 6 years ago

Closed 5 years ago

#3849 closed enhancement (fixed)

Do we need to clear the screen when entering/exiting GRASS?

Reported by: pmav99 Owned by: grass-dev@…
Priority: normal Milestone: 7.8.0
Component: Startup Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

Clearing the screen can often be problematic. More specifically, depending on the SHELL/terminal emulator you use you might lose the ability to scroll back which can be very annoying. Are there any objections in removing it?

Change History (5)

comment:1 by wenzeslaus, 6 years ago

No objections from me. It does not seem that other interpreters or environments are doing it (Python, R, Octave, Bash) even if they show a significant startup message by default (R, Octave). Although this ticket is about interactive use from command line, same is also needed to solve most if not all of #2639 which is about behaving as expected when stdin is provided (grass --tmp-location XY --text < script.sh). I continue with a modification of my comment from https://github.com/OSGeo/grass/pull/4:

I see at least 3 different things happening:

  1. Clear happens at the beginning and at the end. (in "interactive mode", without --exec)
  2. Banner is displayed. (in "interactive mode", without --exec)
  3. Bunch of messages is printed (Starting GRASS GIS... etc.). (even with --exec)

Here we focus on the clearing only.

In #2639 I compared behavior to Python and R in case when standard input is provided. As for interactive use, Python (python), R (R), and Octave (octave --no-gui) display banners (of different lengths), but none of them clears the terminal (at the beginning or the end). That suggests that grass should not do that either.

Copy-pasted command line when R, Octave, Python, and Bash are started and ended follows (newlines preserved, no clearing involved):

$ previous-command 
$ R

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> q()
Save workspace image? [y/n/c]: n
$ octave --no-gui
GNU Octave, version 4.0.0
Copyright (C) 2015 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

>> exit

$ python
Python 2.7.12 (default, Nov 12 2018, 14:36:49) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
$ bash
$ exit
exit
$ following-command

comment:2 by pmav99, 6 years ago

I closed PR4 since it does more than one thing and it might need to be further discussed. PR12 is a new one that only removes the clear screen stuff.

comment:3 by wenzeslaus, 5 years ago

Can somebody second the removal from user perspective? Is terminal clearing important to you in some way or will you welcome not clearing?

comment:4 by sbl, 5 years ago

Like Panos, I also feel that clearing the screen is rather unhelpful. Thus, I would vote for removing it as well.

comment:5 by neteler, 5 years ago

Milestone: 7.8.0
Resolution: fixed
Status: newclosed

PR12 has been merged, closing.

Note: See TracTickets for help on using tickets.