Skip to content

Windows usability improvements - seeking feedback #2419

@vivainio

Description

@vivainio

I've been using lf on both Windows and Linux and ran into several friction points when trying to share a single config file between platforms. I've put together a draft PR (#2418) with a set of changes that address these, and wanted to check whether there's appetite for this kind of improvement before investing more time polishing it.

What the PR addresses

  • Dot file hiding on Windows: zh now hides files starting with . in addition to the Windows FILE_ATTRIBUTE_HIDDEN attribute, matching Linux behavior
  • Shell flag auto-correction: when shell is set to sh/bash (common with Git Bash), the default /c shellflag is automatically corrected to -c
  • Shebang-aware script execution: previewer/cleaner scripts with a #!/bin/sh shebang are automatically run through the configured shell instead of failing with "executable not found"
  • Relative path and env var expansion for previewer, cleaner, rulerfile, and source

Motivation

The overall goal is to make it practical to share one lfrc and one previewer script between Windows and Linux without platform-specific wrappers. Currently users need separate config files or .cmd wrapper scripts to work around these issues.

As a concrete example, my own config at https://github.com/vivainio/dotfiles/blob/master/lf is now shared between Windows and Linux with no platform-specific files.

PR: #2418

Happy to split into separate PRs per change, add tests, or adjust the approach based on feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions