Opened 2 years ago

Closed 4 months ago

#3713 closed enhancement (fixed)

add powershell shell support to grass74.py

Reported by: pmolzer Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Startup Version: 7.4.2
Keywords: Cc:
CPU: Unspecified Platform: MSWindows

Description

I have added powershell as a supported command shell to grass74.py. I don't have SVN commit access and am not on the dev mailing list. Can I just attach the script to this ticket, or should I request some sort of access to SVN?

Attachments (2)

grass74.py (72.1 KB) - added by pmolzer 2 years ago.
grass.py.diff (934 bytes) - added by pmolzer 2 years ago.

Download all attachments as: .zip

Change History (15)

Changed 2 years ago by pmolzer

Attachment: grass74.py added

comment:1 Changed 2 years ago by hellik

could you add a diff of your changes instead of attaching the whole script? Then it would be easier to see and evaluate the changes.

Changed 2 years ago by pmolzer

Attachment: grass.py.diff added

comment:2 Changed 2 years ago by pmolzer

I've attached a diff. I could not find grass74.py in the source but there is grass.py, so I've modified that.

comment:3 Changed 2 years ago by martinl

In 73814:

add powershell shell support to grass.py (see #3713)

patch provided by pmolzer

comment:4 Changed 2 years ago by martinl

Slightly modified patch applied to trunk in r73814. Could you test next (no. 348+) WinGRASS build [1]?

[1] https://wingrass.fsv.cvut.cz/grass77/x86_64/

comment:5 Changed 2 years ago by martinl

Milestone: 7.6.0

Target set to 7.6.0.

comment:6 in reply to:  2 ; Changed 2 years ago by hellik

Replying to pmolzer:

I've attached a diff. I could not find grass74.py in the source but there is grass.py, so I've modified that.

please add some hints/examples in the GRASS wiki how to use windows powershell in winGRASS. otherwise this functionality will be hidden for the broader user base.

comment:7 in reply to:  6 Changed 2 years ago by veroandreo

Replying to hellik:

Replying to pmolzer:

I've attached a diff. I could not find grass74.py in the source but there is grass.py, so I've modified that.

please add some hints/examples in the GRASS wiki how to use windows powershell in winGRASS. otherwise this functionality will be hidden for the broader user base.

+1! This would be highly appreciated by those of us Linux users teaching with command line to windows users.

Note also that you can edit this wiki: https://grasswiki.osgeo.org/wiki/GRASS_and_windows_console

Thanks much in advance :)

comment:8 Changed 2 years ago by pmolzer

will do. I've requested an account for the wiki and wait for approval. Which of these places is the best to add some info?

https://grasswiki.osgeo.org/wiki/GRASS_and_windows_console https://grasswiki.osgeo.org/wiki/GRASS_and_Shell

I'll put some content on use of the GRASS_SH environment variable. maybe also mention the rather heavy escaping needed to call grass from powershell. For example

v.extract input=$state"_Counties" where=`"COUNTY=`'"$ucnty"`'`" output=$cntyname

comment:9 Changed 2 years ago by veroandreo

I think that the GRASS and Windows console wiki is a good start. I'm not aware of ppl using powershell in Linux, but in any case, we could eventually move the content or just put a link "for powershell usage see here..." in the GRASS and shell wiki.

Thanks much!

comment:10 Changed 2 years ago by pmolzer

done. also noticed a feature request to add support for the linux subsystem for windows. I gave it a try but its not as simple as it seems.

comment:11 Changed 22 months ago by martinl

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:12 Changed 20 months ago by martinl

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

comment:13 Changed 4 months ago by wenzeslaus

Resolution: fixed
Status: newclosed

This seems to be already added in r73814. No remaining issues obvious from comments. Closing as fixed. Please, open a new issue on GitHub if you need to follow up.

Note: See TracTickets for help on using tickets.