As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [zsh]

zsh is a shell designed for interactive use, although it is also a powerful scripting language. Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Accidently uninstalled git... Receiving error code

So I was doing an oh my zshell installation on my Ubuntu 22.04 LTS terminal using this guide (https://itsfoss.com/zsh-ubuntu/). But unfortunately, I had accidently uninstalled zsh, git and fonts-font-...
Cherly Marte Castillo's user avatar
0 votes
0 answers
44 views

Snaps don't launch after fixing issue with them not appearing in launcher

I'm having an issue where my Snap apps are not launching whenever I click on them. The first issue was that they weren't showing up in the launcher, but I did some digging and it seems it was related ...
Adrian D.'s user avatar
  • 119
0 votes
1 answer
99 views

Terminal opens neovim instead of vim

I use Ubuntu with the zsh shell, and when I try to open vim with the vi or vim command it opens neovim instead. I tried using the original bash shell, but it still didn't work. I tried sudo update-...
user21493190's user avatar
1 vote
0 answers
94 views

zsh: access history from other zsh sessions, but only when I want to, not by default; e.g. different behavior for "history" command and Ctrl+R

Please bear with me, this is not just another question about basic history control options, and I think it has a solid use case. use case I have many instances of zsh running (tmux with tmux continuum ...
Life5ign's user avatar
  • 394
0 votes
0 answers
215 views

Backspace not working as expected on Alacritty

I just installed Alacritty through the app store on top of zsh and oh-my-zsh, I had it before on a previous installation of Ubuntu without any zsh related stuff where everything was fine. The ...
StackMatch's user avatar
3 votes
0 answers
115 views

WSL zsh Shell Prompt Not Updating

Im running Ubuntu 22.04 under WSL and would like to change my prompt info and look from the default. I did the following sudo apt install zsh chsh -s /bin/zsh I updated the .zshrc file to be PROMPT='%...
rustyocean's user avatar
0 votes
0 answers
97 views

How to set zsh terminal's error message language to English?

I installed zsh but found the error message is Chinese, which is the local machine's language. I want to set it to English. I edited my ~/.zshrc file and set export LANG=en_US.UTF-8 . After reboot my ...
JasonJarvan's user avatar
2 votes
1 answer
1k views

ZSH (oh-my-zsh) spaceship-theme not displaying normally in terminal (adds 3 dots ... to end)

I recently added zsh, oh-my-zsh and installed the spaceship-zsh-theme which I have used on my mac for Ubuntu. I can see the font and style has changed, but for some reason, no matter what I do in ...
Hofbr's user avatar
  • 121
0 votes
1 answer
109 views

After attempting to set up code . on my wsl environment, commands have stopped working

I inserted export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" in ~/.zshrc and after saving and quitting, my commands stopped working. I can't access the rc ...
taco-legs's user avatar
1 vote
0 answers
256 views

No such shell function 'self-insert' using Oh My Posh

I'm using Oh My Posh on my zsh terminal (GNOME Terminal). However, every time I type on the terminal, No such shell function 'self-insert' appears on the prompt after the first character is typed.
Nahid Reza's user avatar
0 votes
0 answers
175 views

Stop tmux new-session after opeing terminal each time

I am using tmux on Kubuntu 22.04.1 with ZSH terminal. I have oh-my-zsh with it. I have enabled tmux plugin of oh-my-zsh. STEPS TO REPRODUCE: enable tmux plugin in oh-my-zsh. copy-paste below code(I ...
Shezan's user avatar
  • 355
0 votes
0 answers
42 views

Unable to use terminal

The terminal colour changes automatically, but I am not able to use the terminal for executing the commands. I have used pywal and the code used is: while true do wal -q -i /home/amithkumar/Pictures ...
Amith Kumar's user avatar
1 vote
1 answer
242 views

Able to connect to server via ssh but not via sftp (bash -> zsh)

OS: Ubuntu 20.04 Hello everyone, I am able to connect to a remote machine via my terminal: ssh remote_name Nonetheless I cannot connect via sftp (thus not able to use Nautilus to access my remote ...
pklein's user avatar
  • 21
0 votes
0 answers
98 views

Is there a way to include Behind / Ahead info in oh-my-zsh Prompt?

I know using the below command, we can get the results of commits that is Behind and Ahead. git rev-list --left-right --count origin/master...`git branch --show-current` But I would like to know, if ...
karthick87's user avatar
  • 80.1k
0 votes
0 answers
130 views

Brew doesn't work after terminal restart

I installed brew using various tutorials and docs amd even from official site. But brew works fine in the terminal tab that I used to install. Then after I open a new terminal window or oprn a new tab ...
Migara's user avatar
  • 1
-1 votes
1 answer
257 views

Alias to create a Python package

Wondering how to create an alias for creating a Python package. A Python package is nothing more than a folder with an empty __init__.py file inside it. So basically I need something like alias pydir=&...
Gabriel Tkacz's user avatar
3 votes
1 answer
287 views

What's the difference between `;` and space when setting environment variable before running a command

I've been wondering what's the difference between the two: CAROOT='certificates'; echo $CAROOT - prints the value, uses ; as separator between two commands CAROOT='certificates' echo $CAROOT - prints ...
The.Wolfgang.Grimmer's user avatar
0 votes
0 answers
64 views

Find command with ZSH based on a list of files

I was used to running BASH but I recently discovered ZSH and I have to say that it works well. However I have a problem with the find instruction below. Let's say we have 3 webp files and one listing....
Osine Bark's user avatar
0 votes
1 answer
129 views

How to run xargs in the background?

I have created an alias to search a certain directory for pdf files and open it via xdg-open. The problem is it doesn't run in the background. Here's my alias: fd . ~/Documents/books -e pdf | fzf | (...
The.Wolfgang.Grimmer's user avatar
0 votes
1 answer
139 views

Function creates a folder but do not cd into the folder if it exists

Following is the function I have added in the .zshrc configuration file to create a Notes folder if it does not exist and if the folder exists it has to cd to that folder. function mnotes(){ if [ ! ...
Santhosh Pai's user avatar
0 votes
0 answers
316 views

Switch to zsh only for current user after ssh into remote server using sudo?

As title. I just sshed into my lab's server and it's Ubuntu 20.04 LTS. But I'm a macOS user and I have gotten used to zsh, but the shell of the Ubuntu 20.04 LTS server defaults to /bin/sh. My current ...
nanono's user avatar
  • 101
-1 votes
1 answer
51 views

zsh vs zsh-static

What is the difference between the zsh and zsh-static packages? Why are there two ZSH packages? Which one should I install if I want to use ZSH as my shell? (Ubuntu version: 20.04 focal fossa).
Flux's user avatar
  • 475
0 votes
0 answers
27 views

Terminal crashes on startup (zsh not found) [duplicate]

Terminal crashes on startup, I previously install zsh and set it as the default shell Then, I removed zsh without changing default shell. please help!!
Shivam Singh's user avatar
4 votes
1 answer
648 views

Enable Command Not Found messages in Other Shells (like Zsh)

I found out how to allow the "... command not found but can be installed with..." to appear in Oh-my-zsh by adding source /etc/zsh_command_not_found to my .zshrc. But now, when I type a ...
AlexFullinator's user avatar
0 votes
0 answers
91 views

Made my user disappear

Recent I installed zsh and made it my default shell, but then I wanted the old one back and decided to uninstall using command sudo apt-get --purge remove zsh. When I restarted my computer my user had ...
Matheus Coelho's user avatar
3 votes
4 answers
4k views

Changing zsh-autosuggestions color

I have installed zsh-autosuggestions plugin in oh-my-zsh. I'd like to change the colour of the text which comes in suggestion. My current color is very similar to that of what comes before. Please see ...
menteith's user avatar
  • 251
3 votes
1 answer
2k views

How can I set up shell the same way as in Kali?

Used kali for a while, it has an awesome zsh now, can I install it on ubuntu? I installed zsh but it doesn't look like on kali. No color differentiation between directories and files, overall gui ...
user avatar
0 votes
1 answer
1k views

Getting org.freedesktop.DBus.Error.AccessDenied error only in VScode integrated terminal - connecting ZSH with spotify

I've edited powerlevel10k ZSH theme to show songs currently played by Spotify in terminal window - works perfectly, except of VS code integrated terminal. Both Spotify and VS code are installed via ...
xDrd's user avatar
  • 51
0 votes
2 answers
515 views

I can't find my alias file

Some time ago I created an alias which is still working (base) Mac-mini ~ % type Iridis Iridis is an alias for ssh ... I want to modify this alias but when I go to nano ~/.bashrc the file is empty. ...
Manuel Dominguez Becerra's user avatar
4 votes
1 answer
240 views

How can I change rubberband colour on Desktop?

(Sorry for any bad English) Lately, I have been customizing my system (Ubuntu 21.10 themed with Yaru Dark and Zsh as shell with powerlevel10k theme). I set it all up, including a cool colour palette. ...
Iván Araolaza's user avatar
0 votes
0 answers
40 views

How to get `Command <insert command> is available in the following places` in zsh

[SOLVED] I just wanted to ask if anyone knows a plugin or any way to get this functionality in ZSH (picture is on bash): I'm running Ubuntu 20.04 LTS, zsh 5.8 with zinit as my plugin manager Thanks ...
Koton Bads's user avatar
0 votes
2 answers
505 views

Unable to launch browser from shell - it opens VSCode instead

I have a problem when some shell command is trying to launch my browser. Example below with browse command, but same with jupyter notebook. It looks like the target is opened in VSCode instead. I'm ...
edmz's user avatar
  • 3
1 vote
0 answers
112 views

How to auto complete like CSH when using ZSH (prefix ↑)

When using zsh how could I auto-complete like csh, for example, having this history: 9994 vim bar 9995 git add . 9996 git commit -am "test..." 9997 ssh 10.1.2.3 9998 ls 9999 vim ...
nbari's user avatar
  • 176
0 votes
1 answer
53 views

Move to folder without using "exec"

In my VM, my projects are at /var/www/vhosts/projectname/httpdocs/. When I boot the machine, I start at /home/vagrant/. I created a script that instantly takes me to the project I want. The problem is,...
Timo's user avatar
  • 3
0 votes
1 answer
58 views

My display name doesn't look how it is supposed to

I installed "Oh My Zsh" in Ubuntu and as I understood my terminal should look like this: ➜ ~. I don't understand why instead it looks like this: risy-ZenBook-UX425JA-UX425JA%. Do you know ...
Dario Risitano's user avatar
3 votes
1 answer
176 views

Can not call defined funtions from .bashrc

I have a function in .bashrc like this: function gs () { cmm="$1" if test -z "$cmm" then cmm="This is Manh Cuong's commit 🌻." fi git add . && ...
Claire Duong's user avatar
-1 votes
2 answers
466 views

When i open kate from terminal, i get multiple messages so How do i get rid of those messages?

$ kate Icon theme "gnome" not found. Icon theme "ubuntu-mono-dark" not found. Icon theme "Mint-X" not found. Icon theme "elementary" not found. Icon theme "...
KUDEY's user avatar
  • 1
2 votes
2 answers
1k views

Getting defining function based on alias `z' error everytime open the terminal

Getting this bellow error every time when opening my terminal (ZSH using) (eval):10: defining function based on alias `z' (eval):10: parse error near `()' Also why getting this error after every time ...
Ferdous90's user avatar
0 votes
0 answers
48 views

How to sort characters with their occurrence in a file, alphabetically and also when the amount of occurrence is the same?

So I have, for example, the following output on the Ubuntu terminal: 238 E 150 A 88 T 88 R Now I want to sort it from the highest occurrence to the least which I have already done. In addition I also ...
IPushedU's user avatar
1 vote
1 answer
1k views

zsh: Understanding command output from wc and passing it to other commands

I'm trying to create a complex command (using shell substitutions and arithmetic expressions) and I was wondering if anyone could helpme understand the output of the wc command. For instance, here are ...
Luis Abreu's user avatar
0 votes
0 answers
391 views

zsh plugin -- zsh-syntax-highlighting cannot be installed

I have installed zsh, git, and oh-my-zsh, but i got an error like this: enter image description here I'm running Ubuntu 20.04 LTS I have .zshrc and ./oh-my-zsh located in $HOME I've googled around for ...
Reynald Lamury's user avatar
3 votes
1 answer
750 views

Open terminal / Run terminal apps with different shells

My default shell is zsh (with oh-my-zsh and other plugins) and everything works fine. On the other side I'd like to -- have new menu, which opens "bash terminal" (gnome-terminal with runs ...
Fantastic Mr. Fox's user avatar
0 votes
1 answer
439 views

How to create a config for your find and delete script [closed]

I have a script that does the following task: Search in a directory for a file with the determined criteria. find Documents/Files/Logfiles/ -mtime +1d -type f '(' -name '*.log' -or -name '*[0-9].*' ')'...
Mahmoud's user avatar
  • 15
0 votes
1 answer
431 views

login shell check is not working in .profile

Ubuntu 20.04, 5.8.0-63-generic, gnome-shell, gdm3 My login shell is set to /bin/sh and I have this line in my $HOME/.profile file: shopt -q login_shell > /dev/null 2>&1 || export SHELL=/bin/...
Sayan Dey's user avatar
  • 198
4 votes
1 answer
331 views

Set parameters for Ubuntu's alias

I have an example command as follows: g++ main.cpp -o main -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs -I/usr/local/include/opencv4 Running the entire above command will create ...
Claire Duong's user avatar
1 vote
1 answer
105 views

ZSH is not showing current path's .deb files

I am trying to install clapper from the .deb file in my Ubuntu 20.04. Last night I installed and configured ZSH for the first time. I think I made some errors during config, as the following happens. ...
Sadiq Nayeem's user avatar
4 votes
1 answer
1k views

Duplicate system PATH variable (snap/bin:/snap/bin)

When I run echo $PATH the duplicate output snap/bin:/snap/bin appears at the end and seems unusual. /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/...
XJMZX's user avatar
  • 69
1 vote
1 answer
1k views

How does `chsh -s $(which zsh)` work?

I changed my shell recently to ZSH, I heard people say they liked it a lot more than the default BA shell or BASH. Everything went fine, followed a guide word for word, and the guide did not miss lead ...
JΛYDΞV's user avatar
  • 191
0 votes
1 answer
172 views

variable substitution

I found this on shell script, in variable substitution option using cap symbols can anyone explain the logic of this nf=${f:gs^__^/^} for f in notes__* books__*; do nf=${f:gs^__^/^} perl -p -...
Vikram 's user avatar
1 vote
1 answer
529 views

Find command shows the files are present but not found inside the directory

I tried search a files using following find command find . -type f -mtime +18 -name '*[-.]20[0-9][0-9\-]*' -exec basename {} \; I can see the files output like . handh2.access.20210429.bz2 handh2....
Vikram 's user avatar

1
2 3 4 5
7