[GRASS-dev] [GRASS GIS] #3849: Do we need to clear the screen when entering/exiting GRASS?

GRASS GIS trac at osgeo.org
Sun May 19 18:11:01 PDT 2019


#3849: Do we need to clear the screen when entering/exiting GRASS?
--------------------------+-------------------------
  Reporter:  pmav99       |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:
 Component:  Startup      |    Version:  svn-trunk
Resolution:               |   Keywords:
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+-------------------------

Comment (by wenzeslaus):

 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
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3849#comment:1>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list