lf icon indicating copy to clipboard operation
lf copied to clipboard

Reloading with '-remote' not refreshing file info after `chmod` unless invoked twice

Open carljohnson93 opened this issue 2 years ago • 2 comments

I've defined following command in my lfrc for toggling executable bit in file's permissions:

cmd toggle-executable-bit &{{
  IFS=$'\n'
  for f in $fx; do
    [ ! -x "$f" ] && chmod +x "$f" || chmod -x "$f"
  done
  # reloaing once not refreshing file information at the bottom
  lf -remote "send $id reload"
  lf -remote "send $id reload"
}}

map <a-x> :toggle-executable-bit

For some reason when there's one lf -remote "send $id reload", file information at the very bottom i.e. "-rw-r--r-- 24M Sun Nov 19 10:52:00" is not refreshed, 'x' not appearing in permissions that is. The file itself is highlighted as executable after first reload though. For me reloading twice helped, but I wonder what's the problem and if I can eliminate this ugly workaround.

====== OS: EndeavourOS Linux x64_86 lf version: r27

carljohnson93 avatar May 12 '22 08:05 carljohnson93

Sounds similar to #821. It's like each and every operation on files now needs a reload. This has completely broken my workflow.

ayushnix avatar May 16 '22 15:05 ayushnix

@ayushnix It's actually quite different from what you described in your issue. I don't have any of those bugs you described. Maybe they are related though, can't tell.

carljohnson93 avatar May 18 '22 06:05 carljohnson93

This is fixed in #1149 and can be closed.

joelim-work avatar Mar 22 '23 10:03 joelim-work