Skip to content

Commit

Permalink
Merge pull request #17 from metzm/grass_prompt
Browse files Browse the repository at this point in the history
libinit: shorten GRASS prompt
  • Loading branch information
metzm committed May 24, 2019
2 parents 14ac3a7 + 158b74b commit a9d7236
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/init/grass.py
Expand Up @@ -1758,7 +1758,7 @@ def bash_startup(location, location_name, grass_env_file):
grass_name = "ISIS-GRASS"
else:
grass_name = "GRASS"
f.write("PS1='{name} {version} ({location}):\\w > '\n".format(
f.write("PS1='{name} {version} ({location}):\\W > '\n".format(
name=grass_name, version=grass_version, location=location_name))

# TODO: have a function and/or module to test this
Expand Down Expand Up @@ -1813,7 +1813,7 @@ def default_startup(location, location_name):
# "$ETC/run" doesn't work at all???
process = subprocess.Popen([os.getenv('SHELL')])
else:
os.environ['PS1'] = "GRASS %s (%s):\\w > " % (grass_version, location_name)
os.environ['PS1'] = "GRASS %s (%s):\\W > " % (grass_version, location_name)
process = Popen([gpath("etc", "run"), os.getenv('SHELL')])

return process
Expand Down

0 comments on commit a9d7236

Please sign in to comment.