diff --git a/doc.go b/doc.go index 18ba3d68..da3f36b9 100644 --- a/doc.go +++ b/doc.go @@ -138,7 +138,7 @@ The following variables are exported for shell commands: $fs selected file(s) separated with 'filesep' $fx current file or selected file(s) if any $id id number of the client - + For Windows, the above variables are exported as `%f%`, `%fs`, `%fx%` and `%id%` respectively. The following variables are set to the corresponding values: diff --git a/docstring.go b/docstring.go index e4a8924a..00b2ea63 100644 --- a/docstring.go +++ b/docstring.go @@ -142,6 +142,9 @@ The following variables are exported for shell commands: $fx current file or selected file(s) if any $id id number of the client +For Windows, the above variables are exported as '%f%', '%fs', '%fx%' and +'%id%' respectively. + The following variables are set to the corresponding values: $LF_LEVEL current nesting level diff --git a/lf.1 b/lf.1 index b39e3522..cb647228 100644 --- a/lf.1 +++ b/lf.1 @@ -156,6 +156,8 @@ The following variables are exported for shell commands: $id id number of the client .EE .PP +For Windows, the above variables are exported as `%f%`, `%fs`, `%fx%` and `%id%` respectively. +.PP The following variables are set to the corresponding values: .PP .EX diff --git a/os_windows.go b/os_windows.go index b2c723d0..538278fa 100644 --- a/os_windows.go +++ b/os_windows.go @@ -12,10 +12,10 @@ import ( ) var ( - envOpener = os.Getenv("OPENER") - envEditor = os.Getenv("EDITOR") - envPager = os.Getenv("PAGER") - envShell = os.Getenv("SHELL") + envOpener = os.Getenv("OPENER") + envEditor = os.Getenv("EDITOR") + envPager = os.Getenv("PAGER") + envShell = os.Getenv("SHELL") envTcellTruecolor = os.Getenv("TCELL_TRUECOLOR") ) diff --git a/ui.go b/ui.go index d8e3b653..ec2ed1f7 100644 --- a/ui.go +++ b/ui.go @@ -982,10 +982,9 @@ func (ui *ui) readNormalEvent(ev tcell.Event) expr { ui.keyCount = nil ui.menuBuf = nil return expr - } else { - ui.menuBuf = listBinds(binds) - return draw } + ui.menuBuf = listBinds(binds) + return draw } case *tcell.EventResize: return &callExpr{"redraw", nil, 1}