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
-1
votes
2 answers

zsh: command not found: mv (I'm trying to move composer.phar)

I'm trying to follow a course on Udemy (laravel). I just downloaded XAMPP (I'm on macOS Monterey) and I edited the ~/.zshrc file and added export PATH=/Applications/XAMPP/bin After that I installed composer which worked successfully, but now when I…
nobah
  • 1
  • 5
-1
votes
1 answer

How do I pass a variable to a bash alias easier nmap scanning? (Function, alias, script…?)

Been poking around for a bit trying to find a straight answer but VScode keeps giving me grief when checking the syntax and the alias doesn't seem to work. I often switch between networks with devices that aren't easily discoverable and their IP…
JWhiteUX
  • 47
  • 9
-1
votes
1 answer

Zsh Costumizing

I was colorizing my prompt. I did it in .zshrc file .zshrc PROMPT=$'%B%{\e[38;2;224;108;117m(' …
Hapalua
  • 13
  • 4
-1
votes
1 answer

Replace a part of a string in zsh

So, in my zshrc I have a blue prompt, and when the root user is used, it uses a version of the same prompt with the word blue changed to red if [ $UID = 0 ] then export PS1="%B%F{red}[ %n@%m ]%f%b %F{white}:%f %F{yellow}%~%f %B%F{cyan}>%b%f " …
Andy3153
  • 33
  • 4
-1
votes
2 answers

Oh-My-ZSH PATH has locations that aren't in .zshrc but are still in path upon echo

EDIT: I have now deleted the $HOME/bin:/usr/local/bin: portion from line 1 of my .zshrc file. So now that line reads as export PATH=$PATH. This got rid of the duplicates, but it still doesnt explain where Mono and Postgres are being added to the…
J. Robinson
  • 931
  • 4
  • 17
  • 45
-1
votes
1 answer

root undoing previous changes after sudo su user

I am having a hard time with root whenever i run sudo su and then nano ~/.zshrc, edit my file to add PATHs followed by a source ~/.zshrc, it works just fine. That until i run sudo su myuser to go back to my default user. When i do that all my…
klferreira
  • 322
  • 1
  • 4
  • 11
-1
votes
1 answer

Command prompt color changes on completion suggestions in zsh/oh-my-zsh

I have a problem that I couldn't find a solution to (maybe I'm just a horrible google user). Anyways: I use oh-my-zsh with a custom theme and one or two plugins, but nothing too fancy. Whenever I double-press tab to bring up the completion…
LeoReentry
  • 81
  • 9
-1
votes
2 answers

Can't write function to replicate the functionality of Bash's 'help' command

I'm trying to replicate Bash's help command in my .zshrc. I thought this would work: function help { bash -c "help $@" } but this only works when I only pass a single argument -- for instance, help exit. It does not work when I pass options to…
BallpointBen
  • 9,406
  • 1
  • 32
  • 62
-1
votes
1 answer

zsh bindkey does not work in a function

I wrote a small function for .zshrc to load plugins and set their keybindings function loadPlugin() { # Function to load external zsh plugins and set keybindings. pluginName=$1 pluginPath=$2 if [ -r $pluginPath ];then source…
atevm
  • 801
  • 1
  • 14
  • 27
-1
votes
1 answer

Print a file in zsh

I am writing my .zshrc. I want my prompt to show my battery level which is stored in /sys/class/power_supply/BAT0/capacity I wrote a function that will take the value from the file and change the color of the digits (green if it is greater than 50,…
Tim Palmer
  • 46
  • 8
-1
votes
1 answer

terminal is garbled after install oh-my-zsh

My terminal show ? after i installed oh-my-zsh. I searched on the internet, and i installed powerline-fonts. But it still shows ?. Help me please. BTW: Theme i'm using is agnoster
Dennis Lu
  • 762
  • 2
  • 9
  • 21
-1
votes
1 answer

Execute a script in my zshrc?

S want to execute a script in zshrc and write the output in a variable VAR=$( /path/to/tool/tool -parameter) is this possible in zsh?
Benedikt S.
  • 31
  • 2
  • 8
-2
votes
1 answer

Avoid running compinit at each zsh startup

I build a huge zsh completion file for my program using clap_complete. To activate it, I added in my ~/.zshrc the lines: fpath+=(~/.zsh/completion) # adding my completion directory to the fpath compinit # running completion However, the compinit…
Hugo Trentesaux
  • 1,584
  • 1
  • 16
  • 30
-2
votes
1 answer

I'm having trouble using this command : vim ~/.zshrc

if you come from bash you might have to change your $PATH. export PATH=$HOME/bin:/usr/local/bin:$PASH can some tell me how to edit this part and how to save it please
-3
votes
1 answer

.zshrc:3: parse error near `>' when i open terminal on mac

i have error when i open my macOS Monterey 12.3.1 terminal after installing flutter like this : Last login: Sat May 14 10:49:04 on console /Users/malela/.zshrc:3: parse error near `>' malela@galihs-MacBook-Pro ~ % and here my .zshrc file export…
1 2 3
41
42