Open wenzeslaus opened 4 years ago
@wenzeslaus After looking at the remaining issues in Project 2: Shells I think it makes sense to refactor the cli shell functions into the new package first and then complete the remaining issues. So ordering the remaining cards in the project something like this...
I'll start working on the refactoring for Move the shell-related functions from init/grass.py to grass.cli.shell #970, but let's settle on a package and module name first.
I like grass.cli.shells
or grass.cli.shell
Sounds good. I reordered the issues in the project. The GUI issue is independent in terms of code (no code for that is in grass.py).
Let's try grass.cli.shells
. Sounds most flexible at this point.
For comparison, not necessarily as a thing to follow, see also an older suggestion: grass-dev move everything from /lib/init/grass.py to /lib/python/init (we want to move everything eventually, but taking smaller and different steps).
What's the status of this bug? @cwhite911 need help with anything? I'm asking since I'm poking around in grass.py, would like to help out with this :)
Problem
The file
lib/init/grass.py
is larger and lager. We need to reduce the amount of code which lives there.Desired solution
I think a new package and module in the library are the best. A good name and place seems to be
grass.cli.shell
(cli
is a new package,shell
is one of its modules ("all different CLI related things including support interactive shells"). Alternatives:grass.cli.shells
("plural since there is more than one shell") andgrass.shell
orgrass.shells
("keep shell-related functions and the (potential) package dedicated to GRASS GIS own command line interface/parsing separate").Additional context
There was a lot of changes lately and addition of Z shell. This will just keep happening.
There is actually so many items including this one already lined up that I created a GitHub project to track it: Project 2: Shells. (Volunteers welcome! BTW)
Additionally, having the code separately in the library may open some possibilities of reusing it in some terminal-related tasks from GUI (see the discussion about optional and/or additional terminal window on grass-dev). Only theoretical option here, but good idea in general.