Git Product home page Git Product logo

Comments (16)

yuk7 avatar yuk7 commented on July 4, 2024 1

We have received some feedback on the feature, but have yet to reach a conclusion.
You can do a similar thing with the settings inside the distro (eg bashrc).
I would like to hear if you have any opinions.

from wsldl.

yuk7 avatar yuk7 commented on July 4, 2024

If you run the run parameter without specifying any commands, you can use prompt in current directory.
Please try it.
{any}.exe run

from wsldl.

freijon avatar freijon commented on July 4, 2024

{any}.exe run works like you described, however it seems it only works on the C: drive and not on fstab mounted drives, so there is a small limitation...

I still think it could be beneficial to have startup-commands.
Example:

  • Create a vim.bat which runs Arch.exe exec vim <file>
  • Drag&Drop any file on the vim.bat file which edits the given file in vim
    For this to work we would need a script in WSL which converts Windows paths in the corresponding WSL path, but that shouldn't be a problem to setup.

from wsldl.

yuk7 avatar yuk7 commented on July 4, 2024

hmm? I couldn't understand the meaning.
Is it a command to run at startup likes bashrc?
Or is it something like Arch.exe run script.sh vim <file>?

from wsldl.

freijon avatar freijon commented on July 4, 2024

It's a command Arch.exe run vim <file>
But Windows would pass the parameter as "C:\myfile.txt", which is useless in WSL. What we would need is a conversion to "/mnt/c/myfile.txt". For this I would create a script.sh.
I would launch Arch.exe run vim `script.sh C:\myfile.txt` which internally would be converted to Arch.exe run vim /mnt/c/mytext.txt

But that's just brainstorming what would be possible ;) The request is just to be able to run a command without WSL being closed immediately.

from wsldl.

yuk7 avatar yuk7 commented on July 4, 2024

runp

It's a bit different from your request, but I working for new runp command now.
It can convert Windows-style path in command line.

from wsldl.

freijon avatar freijon commented on July 4, 2024

This looks great! I would say this is even better than what I asked for ;-)
Does it also work with relative paths? If I run Arch.exe from C:\Users\User and "runp vim test.txt", will it actually edit C:\Users\User\test.txt?
I hope I can give it a try soon.

from wsldl.

yuk7 avatar yuk7 commented on July 4, 2024

Relative paths work too if the distribution is configured properly.
I'll release a new version soon.
i hope you like it...

runp2

from wsldl.

yuk7 avatar yuk7 commented on July 4, 2024

I released new version.
Implemented runp command.
https://github.com/yuk7/wsldl/releases/latest

from wsldl.

freijon avatar freijon commented on July 4, 2024

That was quick, thanks!

Maybe a stupid question... How do I get from the Launch.exe to the Arch.exe without reinstalling everything?

from wsldl.

yuk7 avatar yuk7 commented on July 4, 2024

The executable file with icons is included in icons.zip.
Updates only replace executables.

wsldl connects to the instance by the executable file name. Change the file name.

from wsldl.

freijon avatar freijon commented on July 4, 2024

The new command works fine! The only thing I noticed is that it only works on the C:\ drive. If I run the command from another drive it shows: ERROR: Path translation failed.

from wsldl.

yuk7 avatar yuk7 commented on July 4, 2024

From what I confirmed, I was able to convert non-C hard drives.
Maybe you can't convert a manually mounted one.(external drives)

from wsldl.

yuk7 avatar yuk7 commented on July 4, 2024

It is recommended that you replace the wslpath command.

from wsldl.

freijon avatar freijon commented on July 4, 2024

I've looked for the newest wslpath binaries, but with no success. Can you point me to the newest version?

from wsldl.

yuk7 avatar yuk7 commented on July 4, 2024

I decided not to implement this in wsldl.
Please devise command line parameters.
Alternatively, you can change the default shell with chsh.

from wsldl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.