Questions tagged [zsh]

Zsh is a shell designed for interactive use, although it is also a powerful scripting language.

Filter by
Sorted by
Tagged with
0
votes
1answer
8 views

zsh - how to go back to previous directory?

i just bought a new mac book. in my prevous mac with zsh i was able to do the following command to go back to the previous directory: zsh: - in bash this would be : cd - but now in zsh although ...
1
vote
1answer
11 views

autocd if and only if the path is a collection of `../`

I'm using zsh & I've aliased .. to cd ... I want zsh to cd to a path if and only if the typed out path is a repetition of .. or ../. The following should auto-cd: .. ../ ../../../../ ../../.. ...
0
votes
0answers
12 views

zsh (Default PATH?) messed up with mongodb installation

seems to be imposible after hours and hours trying to solve this problem. All my sudo terminal commands are corrupted due to a several path changes, so i ask for help to set the correct environment ...
0
votes
0answers
7 views

Cannot seem to get Neofetch to auto display when opening iTerm2

This question probably has a very obvious answer, but I have yet to figure out what that answer is. I have Neofetch installed using Brew under macOS Big Sur 11.3. I can run neofetch in iTerm2 and ...
0
votes
1answer
11 views

Why Zsh terminal icons are not getting displayed in Atom Platformio Ide Terminal?

Screenshot of the faulty Atom Platformio Ide Terminal I'm running Atom on Manjaro Linux. And I installed Platformio Ide Terminal. Everything is working fine, except the Zsh shell icons. None of the ...
0
votes
0answers
104 views

What has caused the CTRL + x + e shortcut to stop working in the shell?

The CTRL+x+e keyboard shortcut allows you to open your favorite editor, as defined in the $EDITOR shell environment variable. This has stopped working for me recently, but I am not sure what changed. ...
1
vote
1answer
19 views

How to safely kill bash/zsh/other shells with its history stored?

Shell programs do not react to SIGINT, so kill $(pidof shell) can not kill them. When I use kill -9 $(pidof shell), the shell immediately exited as I expected, but the history in the session is lost. ...
0
votes
1answer
39 views

How to fix 'You don't have permission to open the application' on Mac?

I get the following error when I try to open the app on the mac. I tried using the following solutions: Also here is the behavior when I use the keyboard shortcut:
0
votes
0answers
28 views

How to set the PATH variable with .zshrc

I am trying to compile a program using Intel C and Fortran compilers (icc and ifort) on my Mac (Big Sur 11.2). Both icc and ifort executables are located in /opt/intel/oneapi/compiler/2021.2.0/mac/bin....
0
votes
1answer
18 views

error in zsh with curl?

I want to run a curl command in zsh. curl -X GET "https://api.cloudflare.com/client/v4/zones/<ZONE>" \ -H "Content-Type:application/json" \ -H "Authorization: Bearer &...
0
votes
0answers
15 views

Installing A Framework To My App

I'm using zshell and I am trying to install a react framework called NativeBase. The issue I have is when I try to install the peer dependancies I get the error zsh: command not found: react-native. I ...
0
votes
1answer
21 views

R and shell in macOS Catalina

I just got a new M1 mac with macOS Catalina at my workplace, and I'm having trouble when running R from the command line (actually, when running it from a Makefile). I'm relatively new to the shell so ...
0
votes
0answers
12 views

zsh beeping in Intellij-Idea

When I configure my Intellij (community edition - 2021.1) to use zsh, everytime I type in a command in the terminal there is a beep sound. I already set unsetopt beep in my .zshrc and also ticked off ...
0
votes
1answer
21 views

Schedule zsh scripts so it will remind me something need to be updated?

I'm using MacOSX, and the Terminal.app is now all using zsh as default shell. I use Homebrew to manage all kinds of packages/application installation, while every day I will have to open the terminal ...
1
vote
1answer
10 views

PROMPT variable not changing prompt in Zsh?

The last line in my .zshrc is export PROMPT="foo". I am using this because I heard this is the way to customize a ZSH prompt. However, inside zsh my prompt does not show up as "foo"...
0
votes
1answer
31 views

How to search case insensitive with find shortcut in linux terminal(ctrl+shift+f)

I am using find shortcut in linux terminal (ctrl+shift+f) quite often. The problem is that it is case sensetive, so searching for example: "syn/ack" is no the same as "SYN/ACK". I'...
0
votes
0answers
20 views

Git command or zsh plugin for matching files by their stem that supports autocompletion

Staging files for commits can be quite tedious depending on the directory structure they are in. I am looking for a way to avoid having to type the full path of a file to add it to the index. Say a ...
1
vote
1answer
41 views

Display tilde (~) instead of home folder name when at home in macOS Terminal (zsh)

How do I have ~ $ instead of myUsername $ in zsh? My bash displays like the former and I like it because it looks cleaner. My .bash_profile export BASH_SILENCE_DEPRECATION_WARNING=1 export PS1="\...
1
vote
1answer
33 views

ZSH and globstar to match all files in subdirectories, but not directories

I can do this: $ grep 'text' foo/* foo/**/* but the problem with that is that it expands to list all the files AND directories, so I get a bunch of these errors: grep: foo/a: Is a directory grep: foo/...
0
votes
1answer
14 views

Add function to ~/.zshrc

I'm trying to apply the following : https://stackoverflow.com/questions/58549853/compiling-header-files-for-c-using-vscode-code-runner But I'm stuck/missdo on the part to copy and paste the function ...
1
vote
1answer
26 views

Terminal Zsh error after just opening terminal on Mac Catalina

I am getting a weird message after just opening the terminal and could not figure out the problem. Last login: Wed Mar 31 11:10:55 on ttys000 /Users/rakesh/.zprofile:source:1: no such file or ...
1
vote
1answer
32 views

Wrap text using zsh bindkey

I'm trying to make a keyboard shortcut which wraps the current command in the terminal like this: ($current_command && say done) || say error I've got it partially working with: # ~/.zshrc ...
0
votes
2answers
96 views

Copy Folders to Another Folder Based on List of Known Folder Names in OSX Terminal

I need to find folders within a directory that match a known list and copy them to a subfolder. So far I have found solutions for moving files via a list, but I can't figure out how to do that with ...
1
vote
1answer
177 views

zsh bindkey does not change behavior of up and down arrow keys

I want to change the key bindings of the up and down arrow keys. By default I have: bindkey ... "^[[A" up-line-or-history "^[[B" down-line-or-history ... I have added these lines ...
0
votes
0answers
31 views

Case insensitive terminal completions in macOS Big Sur [duplicate]

I am totally new in MacOS environment and I can't get my terminal completions to work case insensitive. I've tried almost all google search results for this question, like editing ~/.zshrc, /etc/...
0
votes
0answers
12 views

Updating Cygwin and zsh causes permission problems

I updated my Cygwin installation for the first time after more than one year (running the cygwin setup program), and when I started my interactive zsh login shell, I quickly ran into various problems. ...
0
votes
1answer
14 views

gtk-launch autocomplete is very slow

Am using zsh with zsh-completions on arch linux. Whenever i press tab after gtk-launch it takes very long (3-4 seconds) to load suggestions, even if i type a partial word. What could be the cause for ...
1
vote
1answer
51 views

Why does echo “$USER:staff” throw zsh: bad substitution?

Puzzled because echo "PATH=$PATH:/usr/local/sbin" doesn’t (thought it had something to do with :). Also, in Bash, both commands work as I expected. $ echo "PATH=$PATH" PATH=/usr/...
232
votes
3answers
56k views

Why are tar.xz files 15x smaller when using Python's tar library compared to macOS tar?

Context I'm compressing ~1.3 GB folders each filled with 1440 JSON files and find that there's a 15-fold difference between using the tar command and Python's built-in tarfile library on macOS or ...
0
votes
0answers
21 views

What is /usr/bin/cd? [duplicate]

On my Mac (still running Mojave), I typed by mistake (because caps lock was on) CD into my Z-shell. Not surprisingly, I did not get to my home directory. However, there was no error message either, ...
0
votes
0answers
34 views

Specify cut characters used by Alt+Backspace in urxvt

In gnome-terminal that I used before, alt+backspace deleted paths folder by folder, meaning a/b/c/d would become a/b/c. But in urxvt, it deletes the whole path. I searched through documentation but I ...
0
votes
0answers
15 views

Open new iTerm tab and run 'Hello World'

I have been trying to open a new tab in zsh and run a simple 'Hello world' in a bash script but I cannot seem to get it to work. How can I open a new tab using 'open -a iTerm .' and running echo '...
0
votes
0answers
28 views

How to use Jira plugin for Oh-My-ZSH?

I've been trying to get to jira plugin for Oh-My-ZSH to work, but haven't been able to do so so far. I filled in the JIRA_URL, JIRA_NAME and set JIRA_RAPID_BOARD to true using the .jira-url file. They ...
0
votes
0answers
16 views

Mercurial not working on Mac OS 11.2

I am trying to compile Firefox on Mac but Mercurial is not working for me on Mac OS 11.2. I have Xcode and python3 installed and I have done echo "export PATH=\"$(python3 -m site --user-base)...
0
votes
0answers
14 views

How to fix powerline fonts and symobols error in shell?

I've installed Arch about a week ago, and since then I been struggling with the powerline fonts. But after installing the pkg powerline-fonts, I configured the .zshrc file by adding these lines: ...
1
vote
0answers
33 views

Fuzzy finder script to search file contents while floating (i.e. in dmenu/rofi style)

I've been trying to create a script with the following functionality: I push a button in my window manager -> a fuzzy finder menu in floating mode pops up where I can type a keyword to search the ...
1
vote
0answers
19 views

Why tmux does not respect terminal color settings?

I'm using alacritty terminal emulator and ZSH shell. When I customize my alacritty config so it contains light background and specific color scheme, it works allright. But as soon as I create tmux ...
0
votes
0answers
22 views

Easy way to copy .bashrc from ubuntu to .zshrc on macOS?

Is there a way to easily copy the .bashrc from ubuntu to .zshrc on macOS Big Sur? I just really want to PROMPT with the colors and the colorization and highlighting of directories. I am guess it this ...
0
votes
1answer
157 views

putty + powerlevel10k - font issue

I'm running ubuntu with zsh and powerlevel10k and that works just fine on the graphical terminal. I don't really use the TTY terminals, and if I do I can manage to make sense of the broken fonts, so ...
1
vote
0answers
24 views

Why does ZSH crash when autocorrecting PYTHONPATH=$(PWD) test to …pwd…?

When I enter PYTHONPATH=$(PWD) test into my ZSH it asks me if I want PWD to be autocorrected to pwd. If I don't, it works as expected (does not find PWD). But if I do, my zsh constantly crashes with ...
0
votes
0answers
21 views

PowerLevel10k and ColorLS symbols are not showing up, How to Fix This

OS version and name: macOS 11.2 Hyper.app version: 3.0.2 I was trying to get ZSH working with Hyper but then when I try to use PowerLevel10k and ColorLS, the icons don’t show up and instead are boxes, ...
0
votes
1answer
46 views

How do I create a file of aliases for zsh like I did for Bash?

I've spent the last few years learning Ubuntu and fallen in love with Bash aliases. I recently got a Macbook Air and I want to use aliases, but MacOS uses zsh by default. I copied my .bash_aliases ...
0
votes
0answers
116 views

“no such file or directory:” - how to remove directory from .zprofile

I recently uninstalled homebrew from my Mac (macOS 11.2) and since then my terminal opens with the following message: /Users/lukas/.zprofile:6: no such file or directory: /opt/homebrew/bin/brew I ...
1
vote
1answer
36 views

Global alias in zshrc file

I am using the command line in a MacBookPro terminal, with zsh as the default profile. I am trying to write a global alias to the zshrc in my home directory file but encounter a strange error. If I ...
3
votes
1answer
3k views

“brew” command not found after installing Homebrew on an Arm/M1 Mac

I have installed Homebrew using: $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Why is the brew command not found? (base) rags@Rageshs-Mac-...
1
vote
1answer
36 views

Migrating from bash to zsh - where are the packages I installed?

I am new to a lot of this, so forgive me if I don't understand this 100%. I have just installed macOS Big Sur, then installed a few tools in my bash terminal (homebrew, nvm, npm + node, yarn, gatsby ...
-2
votes
1answer
72 views

Having problems merging two images using ImageMagick, the error says that it can't find the images I'm trying to merge

I've tried looking for answers online, but none of the solutions I've found worked. So far I have tried the following three commands; where a and b are the images I want to merge and c is the combined ...
0
votes
1answer
37 views

Start up shell stuck in /bin/sh how to change it back to zsh default at startup

Whenever I start my cli, it keeps starting up in /bin/sh. I've searched various different forms and none so far have worked for my issue. I also tried various options like chsh (1) <--- this only ...
7
votes
2answers
2k views

Odd results on base64 operations

I am having weird output on base64 operations. I have something I want to programmatically download, and found that the links contains base64 encoded data ({date}.zip. This is evidenced by the ...
1
vote
2answers
706 views

“No such file or directory: ~/.oh-my-zsh/oh-my-zsh.sh” even though file exists

I was trying to transfer my terminal setup (iTerm2, zsh, oh-my-zsh, omz themes) from an old MacBook to a new one. .zshrc real file is in Dropbox shared between the two laptops, and in each laptop ...

1
2 3 4 5
24