Questions tagged [zshrc]

The .zshrc file is the configuration file for zsh.

Zsh is a feature rich shell, with many of the features of bash, tsch, csh, and ksh. The .zshrc file is the configuration file for that shell, and it allows zsh to be configured to the user's needs.

616 questions
2
votes
1 answer

correcting $PATH so I can use NPM packages commands on MACOS with ZSH

echo $PATH says : echo $PATH /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin When I run npm command, I get info and I can install packages. I run npm install npm-check-updates When I go for npm list npm…
ragulin
  • 224
  • 2
  • 18
2
votes
1 answer

MacOS zshrc Bad Math Expression operator expected

I'm trying to display to a user when their authentication is about to expire when their .zshrc is sourced on either MacOS or Linux. When running directly in zsh everything appears fine. However when running source ~/.zshrc on MacOS it throws the…
difurious
  • 1,523
  • 3
  • 19
  • 32
2
votes
1 answer

after source ~/.zshrc, zsh terminal does not work

I try to set up react native android development environment vim ~/.zshrc paste ANDROID_SDK_ROOT environment variable source ~/.zshrc However, the following error occurred /Users/username/.zshrc:source:26: no such file or directory:…
nuru
  • 21
  • 3
2
votes
1 answer

correct PATH for zshrc in windows 10

I'm on Windows 10, installed WSL2 with Ubuntu v20 and then I installed Oh My Zsh. I thought I had everything working but when I went to type code ., in my Ubuntu terminal I got the error zsh: command not found: code. When I do echo $PATH I…
2
votes
1 answer

Bash script fails with Python3.8: command not found

I'm new to bash and scripting in general. In short, I'm to run a particular build and one of the tasks fails. This is the first time I'm running this build so I was expecting all sort of issues. The script starts with: #!/usr/bin/env bash And fails…
Sonya gold
  • 87
  • 1
  • 6
2
votes
0 answers

zsh $fpath file with multiple functions

In order to load functions in zsh, everything I read says that each function needs to be in separate file and that file needs to be the same name last the function. the path to that function then also needs to be in your $fpath. Is it possible to…
Bleakley
  • 653
  • 2
  • 9
  • 19
2
votes
0 answers

.npmrc failed to replace env in config

Me and my colleagues have a problem with .npmrc Most of us are on Mac OSx and this works @REGISTRY_NANME:registry=https://gitlab.com/api/v4/packages/npm/ //gitlab.com/api/v4/packages/npm/:_authToken=${NPM_TOKEN} But for me it don't work, but without…
Mike
  • 61
  • 1
  • 2
2
votes
2 answers

zsh: command not found on MacOS Monterey

I wanted to create a react project and when I executed the command it said zsh: command not found: npx Then I tried the ls command and it said zsh: command not found: ls. After setting the export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"…
Minsaf
  • 272
  • 1
  • 5
  • 14
2
votes
2 answers

encountered an error message "zsh parse error near `\n'"

I'm trying to install jekyll bundler using gem. I installed rbenv and tried to add a path in my .zshrc file. After adding these two lines: export PATH={$Home}/.rbenv/bin:$PATH && \ eval "$(rbenv init -)" I entered source ~/.zshrc. However, I got…
okclef
  • 21
  • 1
  • 1
  • 2
2
votes
1 answer

How to make right arrow key in zsh behave like fish's forward-single-char

I've just got into zsh recently, mainly to use it for git on vscode only (cause it looked superr goood) I've been using fish for a very long time, and even now I'm using it as my default shell So I'm trying to configure zsh to behave more like fish…
Cleff
  • 23
  • 1
  • 4
2
votes
1 answer

how to change the zsh terminal path color?

I use on-my-zsh, how to change the path color? here is my config file content in the following export ZSH=$HOME/.oh-my-zsh ZSH_THEME="alanpeabody" plugins=(git) source $ZSH/oh-my-zsh.sh
jiker
  • 339
  • 1
  • 4
  • 7
2
votes
1 answer

Is it possible to format the colour of parts of my git branch name inside the prompt?

In my .zshrc file I have the following lines that parse my current git branch and display it in the terminal, the .zshrc file looks like this: # Load version control information autoload -Uz vcs_info precmd() { vcs_info } # Set up the prompt (with…
mal
  • 3,022
  • 5
  • 32
  • 62
2
votes
2 answers

Parallel version of find command on Linux

On zsh shell, I put into my ~/.zshrc the following function : ff () { parallel -j8 find {} -type f ::: $1/* | grep -i $2 } The goal is to do a "parallel" version of classical find function. But unfortunately, it doesn't seem to work : for…
user1773603
2
votes
1 answer

How do I configure zsh for completion of partial words, but case-insensitive?

Currently I have this in my ~/.zshrc: zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' AFAIU 'm:{a-z}={A-Za-z}' means that I will get case-insensitive tab completion, e.g. foo will tab-complete to Foobar (if…
shahn
  • 577
  • 2
  • 13
2
votes
1 answer

Integrate zsh colors with dircolors

I can produce on terminal with zsh SHELL a list of 256 colors with the command : for code in {000..255} do print -P -- "$code: %F{$code}Color%f" done and currently, I am using dircolors with zsh : NORMAL 01;37 # global default, although…
user1773603