If statement for windows settings or linux settings in LFRC?

26 views
Skip to first unread message

Ben Madden

unread,
Apr 22, 2023, 10:55:28 AM4/22/23
to LF file manager
I use LF personally on my linux machine and at work on a windows machine. I would much rather have one config vs the two I currently maintain. Is there a way to do if statements to check the operating system and set some dependent options within these? Some of the options I am looking to set are things like shell and the file opening functions which are obviously different on each OS. Also interacting with variables is different.

My ideas so far have been to set up a check on $0 which returns /dev/zsh on linux and nothing on windows. Another idea was checking the first character of $HOME which is C on windows and / on linux systems. No immediate luck with these. Any other ideas?
Reply all
Reply to author
Forward
0 new messages