I'm running the latest Fedora with GNOME version 43.2. I've installed ZSH and oh-my-zsh on my system. When I tried to type "sudo dnf remove auda" and hit the tab button for autocompletion, I received the following suggestion from ZSH. In other word, hitting TAB after auda will append the zsh: sqlite3 as you see below.
# Attempting to remove audacious
sudo dnf remove audazsh: sqlite3: command not found...
Install pacsudo dnf remove auda
# Another example trying to remove Gimp
sudo dnf remove gizsh: sqlite3: command not found...
Install pacsudo dnf remove gi
It seems any command ZSH and oh-my-zsh with auto-suggestion plugin will work just fine but not the application name itself.
Anyone run into this issue? It's quite annoying. I'd rather it not suggest anything instead of appending gibberish to the command.
The following aliases are working in bash but not in ZSH:
# Different installed version of JDK
export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8)
export JAVA_11_HOME=$(/usr/libexec/java_home -v11)
alias java8='export JAVA_HOME=$JAVA_8_HOME'
alias java11='export JAVA_HOME=$JAVA_11_HOME'
# default to Java 11
java11
I only get the following error:
zsh: command not found: java8
I can change the JDK version if I do it like this:
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
But the alias java8 or java11 are not recognised.
I'm assuming these all appear in your .bashrc file. You need to add them to .zshrc for zsh to define them.
I've been using oh-my-zsh for a while and it's working great. I'd like to use the command-line fuzzy finder plugin so I enabled it in .zshrc:
plugins=(fzf)
However if "fzf" is not installed I get a warning when opening my terminal window:
[oh-my-zsh] fzf plugin: Cannot find fzf installation directory.
Please add export FZF_BASE=/path/to/fzf/install/dir to your .zshrc
Is there a way to hide that warning message? When I install fzf with "sudo dnf install fzf" the warning dissapears, but maybe I want to clone my dotfiles on a different computer where it is not available and it's not that important to be there.
you should first install fzf, in Mac and i use the following command to install brew install fzf
You need to have fzf installed to use this plugin; otherwise remove it. It won't do anything without first installing fzf. Sudo apt install fzf
You can put the plugins= line inside an if statement that checks for the presence of fzf in your path. For example:
if [[ -n $(command -v fzf) ]] ; then
echo "fzf found, loading oh-my-zsh fzf plugin"
plugins=(vi-mode fzf)
else
echo "no fzf was found in the path"
plugins=(vi-mode)
fi
command -v is similar to which, but is superior for this context as explained in this answer.
The -n makes the [[ ]] evaluate as true whenever the $() produces a non-empty output.
For me, it was also very important that brew itself was in Path of ~/.zshenv like so:
export PATH=/opt/homebrew/bin:$PATH
Installed FZF with brew on an M1 Mac.
Otherwise, the error occurs:
[oh-my-zsh] fzf plugin: Cannot find fzf installation directory.
Please add `export FZF_BASE=/path/to/fzf/install/dir` to your .zshrc
When you install fzf by using brew, it needs to be set brew env.
You can solve to set PATH for fzf before the line of plugins=(fzf) in .zshrc file.
But, I recommand creating "$HOME/.zprofile" as following.
For m1 Mac.
# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/opt/homebrew/bin/brew shellenv)"
For, intel Mac
# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/usr/local/bin/brew shellenv)"
I am using ZSH + iterm as a command line tool.
When I am trying to run pytest tests with xdist plugin in several subprocesses I get an error: no matches found: 3*popen
Execution command: pytest --tx 3*popen --dist=load
Additional info:
OS version: OSX 10.13.2
Pytest: 3.4.0
Terminal: Iterm + ZSH
Try quoting *. For example:
pytest --tx 3\*popen --dist=load
or
pytest --tx '3*popen' --dist=load
By default zsh prints an error if it cannot match a filename pattern (while bash would just leave the pattern unchanged). Quoting glob operators, like *, prevents their evaluation, allowing to use them verbatim.
It would also be possible to make zsh behave like bash by disabling the NOMATCH option with setopt no_nomatch. Personally, I would recommend against it, as it could lead to unexpected results in case there are actually matching file names.
I'm using zsh on my Ubuntu VPS.
When I try to find version
php -v
zsh: command not found: php
and my php executable somehow got into
whereis php
php: /usr/share/php
How can I point it to right path?
export PATH=$PATH:/usr/share/php/bin
Add this to your .zshrc (assuming /usr/share/php/bin is the directory in which the php binary lives).
Ho you have to over write all commands to zsh
try this
PATH=/bin:/usr/bin:/usr/local/bin:${PATH}
export PATH
Just reinstall PHP and overwrite any previous installation with this:
brew link --overwrite php