#!/bin/bash # only convert the path if one is provided if [ ! -z $1 ] then linuxPath="$(realpath $1)" windowsPath="$(wslpath -w $linuxPath)" fi # avoid the UNC path warning cd /mnt/c/Windows # launch atom on Windows cmd.exe /c "atom $windowsPath"