O.S: Pop!_OS
ZSH didn't display in the list of shell options.
When I run which zsh returns /usr/bin/zsh, so I added "terminal.integrated.shell.linux": "usr/bin/zsh" to vscode settings, but this doesn't work to. I also tried using /bin/zsh.
Error when I try open terminal:
The terminal process failed to launch: Path to shell executable "/usr/bin/zsh" does not exist.
Related
after installing the bun framework I'm prompted to run the following two commands.
Manually add the directory to your $HOME/.zshrc (or similar)
export BUN_INSTALL="/Users/foo/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
after I run these in my terminal bun is working. If I am to close my terminal, reopen and run bun --help I see zsh: command not found: bun
until I run the two following commands from above again. How can I resolve this to not have to repeat those commands?
If you running those export statements from your current shell / cli than those are available only in the current shell environment. It's not available in any other shell you launch.
You need to put them in your ~/.zshrc so they are exported in every shell environment you launch.
Or you can just put them in your ~/.profile ( or ~/.zprofile , whichever you are using) and do source ~/.[z]profile and it would be available in every subsequent shell you launch.
I'm trying to create an Automator application on Mac OS X Mojave which starts my pyenv.
If I run this command from the bash shell it works fine:
pyenv activate myenv
However from within Automator I get the following error:
The action “Run Shell Script” encountered an error: “[31;1m
Failed to activate virtualenv.
Perhaps pyenv-virtualenv has not been loaded into your shell properly.
Please restart current shell and try again.
[0m”
[31;1m
Failed to activate virtualenv.
Perhaps pyenv-virtualenv has not been loaded into your shell properly.
Please restart current shell and try again.
[0m
If I add whoami at the start of the shell script, then it shows that Automator is running the script as me, so it should have the same $PATH etc. However if I echo the $PATH variable it is clearly not the same as when I run it directly from the shell. Manually setting the $PATH in the script doesn't help either.
Oddly, running python --version in the script does not generate any output.
Running which python does generate output: /usr/bin/python
Any clues as to why this doesn't work?
I am sure this is a configuration issue, but I cannot find what is wrong. I have zsh and oh-my-zsh installed on my new Mac view homebrew.
When I start terminal it doesn't load zhs theme or autocomplete unless I run zsh command to start it. After that all works fine.
However, all the aliases I setup in .zshrc file works fine without running zsh and there is no .bashrc file in the machine.
How can I make zsh to start automatically when I open iTerm.
You can change your default shell to zsh.
Using the below command, and type your password
chsh -s /bin/zsh
If you want to use brew managed zsh, you should append /usr/local/bin/zsh to the end of file /etc/shells, then run command chsh -s /usr/local/bin/zsh.
Then reopen your iTerm2, done.
I have problems with my terminal after trying to install Homebrew on my Mac. When I start the terminal I get :
-bash: touch: command not found
When I do echo $PATH I get:
/usr/local/bin:??
I've tried several suggestions like
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
and then it works, but when I restart my terminal, it starts all over.
According to the bash man page, .bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.
Mac OS X runs a login shell by default for each new terminal window, calling .bash_profile instead of .bashrc.
Setup your PATH variable in .bash_profile
vim ~/.bash_profile
correct PATH variable with below single line(which is working fine as per the question)
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
Hi I've recently installed zsh using cygwin on my Windows machince but when I type zsh to start this I get the following:
GG#GG-PC ~
$ zsh
\[\e]0;\w\a\]\n\[\e[32m\]\u#\h \[\e[33m\]\w\[\e[0m\]\n\$
On my mac I am using iTerm2 and this is so much easier to setup on here. Also I am having trouble in setting up the aliases and this is becauses its not setup properly in terms of config file where I can set this up in a separate file.
Any ideas how I can resolve?
It looks like zsh is inheriting the value of PS1 from the previous shell. The PS1 environment variable sets the shell prompt, and zsh used a different format for prompt substitutions than other shells. Try entering the following command after you start zsh:
PS1=$'%{\e]0;%d\a%}\n%F{green}%n#%m %F{yellow}%d%f\n%# '
If that works, add that line to your ~/.zshrc file.
That's also probably a good place to put your aliases.
There might be an issue because you launch zsh from bash actually and not cygwin.
One thing you can do is to launch zsh as the starting shell of mintty (the window that wraps your shell)
Create a shortcut with this inside:
c:\<cygwin-folder>\bin\mintty.exe -i /Cygwin-Terminal.ico /usr/bin/zsh --login -
Yo need to update .zshrc with your required theme and then
source .zshrc