GitHub - faratech/fwdslash: Lightweight Windows utility providing native forward-slash path translation and aliases for WSL (Windows Subsystem for Linux). · GitHub
Skip to content
faratechPublic

About

Lightweight Windows utility providing native forward-slash path translation and aliases for WSL (Windows Subsystem for Linux).

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

153 Commits

Folders and files

Repository files navigation

fwdslash

Type Linux paths in Windows. /etc/apt in the File Explorer address bar opens \\wsl.localhost\Ubuntu\etc\apt.

License: MIT Platform Rust WSL GitHub stars

fwdslash in the Run dialog, File Explorer, Windows Search, an Open dialog, Command Prompt, PowerShell, and the settings app


Why fwdslash?

You know where the file is. You just can't type it. \\wsl.localhost\Ubuntu\... is fine in a script and miserable in an address bar, so type the path you were thinking of instead.

  • Works where you already navigate — File Explorer, Win+R, Windows Search, Open/Save dialogs
  • No driver, no admin — per-user, reversible, no Explorer restart
  • Terminals too, if you want — dir, ls and cd take slash paths in Command Prompt and PowerShell
  • Fails safely — a typo is blocked with an explanation instead of becoming a web search
  • Stays out of the way — pause it from the tray icon
  • No telemetry, no account — the only network use is the app checking for its own update, under a switch you control

Where it works

Surface Type this
File Explorer address bar /etc/apt
Run (Win+R) /usr/share
Windows Search /etc
Open / Save dialogs /home/alice
Command Prompt * dir /etc/apt · cd /Ubuntu
PowerShell 5.1 / 7 * ls /usr · cd /Ubuntu

* optional adapters, off by default


Paths

/Ubuntu                 →  \\wsl.localhost\Ubuntu
/Ubuntu/home/alice      →  \\wsl.localhost\Ubuntu\home\alice

Bare / lists your distributions and never silently picks one. Prefer a default? Then plain Linux paths work unprefixed:

fwdslash bare-slash default          # follow `wsl --set-default`
fwdslash bare-slash default Ubuntu   # or pin one
/etc/apt                →  \\wsl.localhost\Ubuntu\etc\apt

Or point / at any folder at all — WSL not required:

fwdslash bare-slash root C:\code                            # / becomes C:\code
fwdslash bare-slash root \\wsl.localhost\Ubuntu\home\me   # or a folder inside a distro
fwdslash bare-slash root                                    # clear it
/                →  C:\code
/proj/build      →  C:\code\proj\build
/Ubuntu/home     →  still the distribution

A registered distribution always wins over a same-named folder.


Install

Requires Windows 11. WSL is optional: /Ubuntu/... paths and default-distribution mode need a registered distribution; a custom / root works with none.

Microsoft Store (recommended)

Get it from the Microsoft Store — Store ID 9P51CM0MTMK2. The Store handles the Windows App Runtime dependency, and updates the app on its own schedule. Switch Automatic updates on in Settings (it is off by default in this build) and the app will also ask the Store to install its updates itself, without waiting for that schedule.

GitHub

One line, no administrator rights; the release is signed with a publicly trusted certificate:

powershell -ExecutionPolicy Bypass -File Install-fwdslash.ps1

It fetches the latest signed .msixbundle, installs the Windows App Runtime 2.x if missing, and registers the package for the current user. This build checks GitHub for updates once a day and installs them itself; Automatic updates is on by default here and can be switched off in Settings.

Pick one flavor. Both register the same startup task and fwdslash alias, so only one broker survives a logon with both installed; the script refuses to install over a Store install unless you pass -Force.

Each release also carries a fwdslash-<version>-store-unsigned.msixbundle. That one is not installable — it is the Microsoft Store submission artifact: the same binaries under the Partner Center package identity, left unsigned because the Store re-signs what it accepts, and published only so the Store submission is reproducible from the release. Install the plain .msixbundle, or get the Store build from the listing above.

Build from source

cargo build --release --target aarch64-pc-windows-msvc --workspace   # x86_64-pc-windows-msvc on Intel/AMD
.\target\aarch64-pc-windows-msvc\release\fwdslash.exe install

An unpackaged build needs the Windows App Runtime 2.x installed separately.

Uninstall

fwdslash uninstall

Removing the package from Settings > Apps runs no code (an uninstalling MSIX never does), so the leftover shell hooks clean themselves up on the next shell launch instead: the first PowerShell or Command Prompt window you open afterward removes every fwdslash profile block and cmd AutoRun entry (restoring what was there before, or refusing if you changed it since), deletes the HKCU\Software\ForwardSlashWindows keys, and clears the %LOCALAPPDATA%\ForwardSlashWindows payload — silently, unless there is an error you need to act on. The payload directory itself goes a few seconds later, through a one-shot scheduled task, because the cleanup is running from inside it.

Turning the terminal integrations off in the settings app first is still the tidy path, and it takes effect immediately.

With Controlled Folder Access on: the self-clean writes to your Documents folder, so it can only remove the profile blocks if the staged controller (%LOCALAPPDATA%\ForwardSlashWindows\PowerShell\<version>\fwdslash.exe) is allowed through Controlled folder access. If it is not, the guarded block stays in place — harmlessly and silently, since it only imports a module that is still there or does nothing at all — and you can remove it by hand or by allowing that executable. Turning the integrations off before uninstalling avoids the situation entirely.


Terminals

Shells parse / before the filesystem sees it (cmd.exe reads it as a switch), so terminal support is an opt-in adapter:

fwdslash integration cmd enable
fwdslash integration windows-powershell enable
fwdslash integration powershell enable

Each adapter records what it replaced, restores it byte-for-byte when turned off, and refuses to overwrite anything another program changed since. Open a new shell afterwards.

PowerShell execution policy. The PowerShell adapters work by adding a guarded block to your profile.ps1, so the edition's execution policy has to let local scripts run. Windows PowerShell 5.1 ships Restricted on Windows client editions; PowerShell 7 ships RemoteSigned.

Effective policy PowerShell adapter
RemoteSigned, Unrestricted, Bypass works
Restricted, Undefined blocked — fwdslash refuses before changing anything and prints the one-line fix
AllSigned unsupported — your own profile.ps1 would need an Authenticode signature that no installer can give it

The fix, run in the edition you are enabling (the policy is per edition):

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

fwdslash doctor and fwdslash integrations report each edition's effective policy, and the settings app shows the same guidance when an enable fails. The module the adapter deploys is Authenticode-signed in the release builds, but that is integrity only: it does not change the Restricted case (nothing runs at all there) and does not make AllSigned usable.

With an adapter on, dir/ls and cd both take slash paths:

cmd          cd /Ubuntu/etc     chdir /Ubuntu     pushd /Ubuntu   (cd /d /Ubuntu too)
PowerShell   cd /Ubuntu/etc     chdir  sl  pushd

Notes: cmd.exe cannot make a UNC path current, so its adapter enters the target with pushd (a temporary drive letter released by popd). DIR's own switches (dir /b, dir /s, dir /a:d) stay native. In PowerShell a slash path the resolver rejects reports the resolver's message rather than landing on the current drive, so use cd \Windows for C:\Windows.

Without an adapter, these always work:

fwdslash list /Ubuntu/etc
fwdslash open /Ubuntu/home
fwdslash resolve /etc/apt

Commands

fwdslash status [--json]          Broker, distributions, and driver state
fwdslash resolve /Distro/path     Print the resolved UNC path
fwdslash open|list /Distro/path   Open in Explorer, or list to stdout
fwdslash cmd-list /path           Shell adapter DIR (exit 3 = run native DIR)
fwdslash cmd-cd /path             Directory for the cmd CD/PUSHD macros
fwdslash shell-resolve /path      One JSON line for the PowerShell module
fwdslash doctor /path | --all     Diagnose a path
fwdslash bare-slash [list|default [Distro]]
fwdslash bare-slash root <WindowsPath>
fwdslash integrations [--json]
fwdslash integration <name> enable|disable
fwdslash update check|install|status
fwdslash pause | resume           Pause resolution, keep integrations
fwdslash settings [section]       Open the settings app
fwdslash start | stop | install | uninstall
fwdslash version                  Print the running version

Settings

One notification-area icon, owned by the resident broker. Left click opens the settings window; right click offers Enabled, Open WSL root, Open distribution (one entry per distribution), Integrations, and Exit. Closing the settings window closes only the window; the broker keeps running.

Each integration is independent, and turning one off runs its reversible uninstall. The Disable switch pauses resolution without forgetting what you installed. Adapters left behind by an older release are upgraded automatically, by the broker at start and by the settings window on launch. The About page shows the broker state, each adapter's payload version, the package version and flavor, and when the last update check ran.

Updates

Automatic updates is one switch, in both flavors — on by default in the GitHub build, off by default in the Store build. With it on, the app checks once a day: the GitHub build against its release feed, the Store build against the Store. Check now runs a check immediately. When an update installs, Windows closes the running app to replace it, and the app starts itself again as soon as the new version is registered — usually within seconds, and never with a prompt for administrator rights. With the switch off nothing is checked or installed on its own; the Store still updates a Store install on its own schedule, as it does for every app.


Tests

cargo test -p fsw-path -p fsw-core                                     # resolver + registry contract (runs on Linux/WSL too)
cargo test --workspace --all-targets --target x86_64-pc-windows-msvc  # everything, on Windows
.\tools\Test-Sandbox.ps1                                              # lifecycle smoke test

Releasing

The version lives in one place — [workspace.package] version in the root Cargo.toml — and every other copy of it (the VERSIONINFO fallbacks, the app manifest, the About header, SECURITY.md, the Store doc) is rewritten by python3 tools/bump_version.py 0.0.4 (.\tools\Bump-Version.ps1 on Windows). CI runs tools/bump_version.py --check on every push, so a copy left behind fails the build rather than shipping. To cut a release: bump, open a PR, merge it, then tag the merge commit v0.0.4 and push the tag. .github/workflows/release.yml takes it from there — it refuses to run if the tag and the workspace version disagree, then builds x64 and ARM64, signs the GitHub flavor with Azure Trusted Signing, publishes the GitHub release, and submits the unsigned Store bundle to Partner Center. Nothing is built or signed by hand.


Filesystem driver

driver/ holds an optional minifilter that would extend /Ubuntu/... paths to every Windows filesystem API (PowerShell, .NET, Python). It is not part of any release.

Do not load the unsigned driver on a physical machine. Build and test it only in a checkpointed Hyper-V guest; docs/driver-lab.md is the runbook. See also SECURITY.md and docs/compatibility.md.


Docs


License

MIT — see LICENSE. By Mike Fara, Fara Technologies LLC, New York.

Star this repo if you find it useful!
https://github.com/faratech/fwdslash

Get fwdslash from the Microsoft Store
Available on the Microsoft Store as fwdslash — Store ID 9P51CM0MTMK2

About

Lightweight Windows utility providing native forward-slash path translation and aliases for WSL (Windows Subsystem for Linux).

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages