From: Armaan Bhojwani Date: Sat, 13 Feb 2021 19:33:35 +0000 (-0500) Subject: Replace $EDITOR in menu with actual editor X-Git-Tag: v0.7.0~24 X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=commitdiff_plain;h=1dacbc89d337361486116644a0ea9b3e1a76bac6 Replace $EDITOR in menu with actual editor --- diff --git a/lightcards/display.py b/lightcards/display.py index 049a016..e91fed1 100644 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -132,6 +132,7 @@ class Menu: curses.color_pair(1) + curses.A_BOLD, ) self.win.hline(2, 1, curses.ACS_HLINE, mcols) + env = os.environ.get("EDITOR", "$EDITOR")[:15] text = [ "[y]: reset stack to original state", "[a]: alphabetize stack", @@ -140,8 +141,7 @@ class Menu: "[u]: unstar all", "[d]: star all", "[s]: update stack to include starred only", - "[e]: open the input file in $EDITOR", - "", + f"[e]: open the input file in {env}" "", "[r]: restart", "[m]: close menu", ]