lf: (BUG) The bottom status bar is not updated
The authorization list of files and directories does not change, even if I use the reload command. Here is the example command I created:
cmd change_permission ${{
clear
set -f
printf "New permission -> "
read perm
for f in $fx; do
sudo -A chmod "$perm" "$f"
done
lf -remote "send reload"
lf -remote "send unselect"
lf -remote "send clear"
}}
Even if I use the reload command, the lower status shows the old authorization, while the color of the file changes according to the authorization. If I move the cursor back and forth, the authorization display on the lower status bar is also updated.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15
Yes. Both of them address all the reload cases I could think of, so you can use whichever one you prefer.
Hi @DusanLesan
Here you go, apologies in advance for the large wall of text that follows 😛
Solution 1:
Checkout this branch: https://github.com/joelim-work/lf/tree/reload-status-bar-1
I have found that removing the
if app.ui.msg == ""
condition and updating the status bar unconditionally may be undesirable. For instance try the following scenario:lf
and trigger an error message (e.g.unknown mapping
by typing some unbound key)touch
the directory, or create a new file in it)lf
, force it to load (you can runlf -remote 'send load'
, I have also gotten this to work by configuringset period 1
)lf
, which users could find annoying.Solution 2:
Checkout this branch: https://github.com/joelim-work/lf/tree/reload-status-bar-2
This approach keeps the
if app.ui.msg == ""
condition so that error messages won’t get wiped out. I haven’t found any downsides with this approach, other than the fact that it is kind of a hack to clearapp.ui.msg
just to satisfy that condition when the directory is reloaded.Okay, reopened.
Ohh, working, thank you! 😃