krotje.blogg.se

Sublime text windows 10 bash
Sublime text windows 10 bash













#SUBLIME TEXT WINDOWS 10 BASH KEYGEN#

sublime text windows 10 bash

mnt/c/Program Files (x86)/Sublime Text 3/subl.exe Remove extraneous \. :)īash args forwarding: You can do "perfect" args in sh-compatible shells like Bash forwarding by using : #!/bin/bash Make a symlink if it makes the experience more comfortable. Put the files you want to work with into a folder somewhere in the Windows filesystem, and access it with WSL from there. WSL is specifically sold as being able to access Windows files, but accessing the Linux filesystem is strictly discouraged here - here's another page specifically called "Do not change Linux files using Windows apps and tools". hello.w is a relative path.and so the location changes when you change the current working directory of Bash! You should simply call the absolute path of Sublime executable with the args you want - see below for an example of this with another thing I want to show you. In your script, you're actually cding into the Program Files folder for Sublime. The place Sublime actually opens a file is in your title bar: C:\Program Files (x86)\Sublime Text 3\hello.w.Note that in your Bash prompt, you're currently at ~ - this is your $HOME, probably in the WSL filesystem.Remember that 'subl' or 'st' is to your discretion. Usually, if Sublime is opening a blank file but the filename is populated in the tab.it's because it couldn't find the file, and it's using the path you gave it as a new file: in your CLI (command line) or Git Bash (what im using) type in: alias subl'/c/Program Files/Sublime Text 2/sublimetext.exe' (this is the directory of where your sublimetext.exe file is. Now, we will configure bash to send X window output to Xming by default. Not only because it's annoying to keep opening the files the windows way, but also because I'm very curious. Remember: You will need to make sure xMing is running in Windows 10 each time before you start Sublime. I'd really love some help to make this work.

sublime text windows 10 bash

It does indeed open a file that has it's name set to my argument, but it's empty. However when I added the $1 to the "script", it does only half the thing I want it to. I knew that in windows command line, it is possible to launch subl.exe with a file as an argument and it will open. I would really love to pass the file as an argument.

sublime text windows 10 bash

Being a programmer, I got lazy and this started bothering me quite a lot. Or here's a screenshot if you prefer that.Īt first, I was using it without the $1, I just used it to open Sublime Text and after that I opened the file through File-Open (Ctrl + O). In /usr/bin I placed a simple executable file "subl", which reads: #!/bin/bashĬd "/mnt/c/Program Files (x86)/Sublime Text 3" Doesn't matter, I don't want to get into that anyway. I already had the ST3 installed for Win, but I tried installing it for linux through the shell, which obviously didn't work. I'm a Windows 10 user but I very much prefer using the bash shell when programming, because that's what I'm taught at the uni.īeing a clever boy, I got myself the Windows subsystem for Linux or as I call it, Bash for Windows.













Sublime text windows 10 bash