From 1dacbc89d337361486116644a0ea9b3e1a76bac6 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Sat, 13 Feb 2021 14:33:35 -0500 Subject: [PATCH] Replace $EDITOR in menu with actual editor --- lightcards/display.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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", ] -- 2.39.2