How to open Anaconda Prompt from Windows Explorer URL? - terminal

I would like to open the Anaconda Prompt within a current folder using the URL in Windows Explorer similar to how you open a Git Bash terminal using "git-bash here".
I was unable to find a way to do this.
I tried to add the installation directory to the system PATH variable but that didn't work.
Any ideas if this is possible?

Related

issue with Git Bash

I am able to open git bash by typing "git bash" in the windows explorer URL space on one of my other laptop.
However, I'm trying to do it on another laptop of mine and it refuses to work. A black terminal opens for a split second and then disappears.
I've reinstalled it multiple times to no avail.
Currently using v2.27 of Git on Windows 10.
Any idea how I can get this working again? It's super convenient for me.
In system variables the C:\Program Files\Git\cmd is added to Path.
To launch git-bash.exe (which is the program which will use git.exe internally)
directly from windows explorer address field, you need to make it findable in Path.
git-bash.exe is in C:\Program Files\Git\ (notice the lack of cmd directory)

How to access Anaconda in PowerShell after reinstallation?

Anaconda was installed by Systems Team on my work computer.
For reasons beyond this topic, they installed in Program Files, which I think is non-optimal.
So I ask permission to remove the installation and reinstall it via standard procedures.
When I open Anaconda PowerShell prompt it is still pointing to the Program Files installation which I have removed.
I have also checked the Path environmental variable, and there is nothing looking like Anaconda is still there.
How can I get Anaconda PowerShell prompt to work again?
It should be noted that conda command does work in regular command prompt.
Thanks.
Initialize conda for use with Powershell via
conda init powershell
This command should be run in Anaconda Prompt.
Before following #Peter's solution, I was able to track the problem via a more rustic procedure.
Right click on Start Menu's Anaconda PowerShell Prompt, and select Open File Location.
Right click on the icon's Properties, select Shortcut tab > Target field.
Copy the command to a text editor, and noticed it was still using an old location.
Changing the command to point to the right location did fix the problem.
... but that is only the command from the Start Menu, the rest is done by what was suggested before.
Thanks for the help.

Have WSL shell open to project directory in Windows Visual Studio Code

I have a windows subsystem for Linux Installed on my computer and am using it as the integrated terminal on Visual Studio Code. Every time I open a terminal however, it opens in the root directory rather than the current project directory like other terminals do.
Does anyone know of a fix for this?
I have tried messing with the Cwd of the integrated terminal settings but haven't had any luck.
Try using wsl.exe as the command for shell.
"terminal.integrated.shell.windows": "wsl.exe"
I know that is very late for this answer, but for me it just worked.
I put exactly as above and it launched in my home directory (that is /mnt/d/Users/Adrian).
I have the user setup of VSC, 1.30.1 and launch it from the Desktop shortcut.
After I configured terminal as wsl I go as below:
If I open a cmd windows I can launch it with code . it will launch in Windows home directory.
If move to some other folder (e.g Documents) and launch it with code . the bash will launch to that folder.
Otherwise I can launch it with code D:\Users\Adrian\Documents\VSC and the bash terminal will launch in \mnt\D\Users\Adrian\Documents\VSC
Tested the change both via menu File->Preferences->Settings and with Ctrl+Shift+P (Command Pallete), Terminal: Default Shell.
Tried with bash and wsl.
Maybe you have some other bash installed in the path? (e.g. git bash or MinGW bash?)

Launching Explorer from WSL

start . is used to launch an explorer window from cmd.
When doing the same from wsl, I get
$ start . start: Unable to connect to system bus: Failed to connect to
socket /var/run/dbus/system_bus_socket: No such file or directory
Is there an easy way to fix this?
Since Creators Update you can call Windows executables from WSL if you add the extension file. You can open the present folder like this.
explorer.exe .
If you still need start then you can create an alias
alias start='cmd.exe /c start'
then start . will work too.
You can call Windows executables from WSL but you should add the extension of the file too. also there is another problem that in wsl when you want to open a directory in the file explorer, you should use explorer.exe \\home\\username\\projects\\ command because windows cannot understand linux standard path slashes. so, I made a wrapper to solve all of these problems. this project is a wrapper between the Linux command-line and windows file-explorer that converts / to \\.
with this wrapper you can interact with the windows file-explorer exactly like the linux-native one. the below box exhibits the way you can open file explorer using this wrapper.
explorer /home/

How to get GitHub desktop's "git" tool working globally in cmd, PowerShell?

I already have GitHub Desktop, it works great, but it doesn't make available git command in Powershell and Command Promt. And I don't want to download and install entire git-scm just for this convenience.
Just put it somewhere in the path, where windows automatically searches for executables, or extend path.
http://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/

Resources