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

how to avoid enviroment variable from resetting in WSL terminal after restart?

environment variable set (in zsh shell) in WSL disappears after restarting the terminal. I have used export variable_name=variable_value to set environment variable. how should I avoid env variable from resetting after restart.
2
votes
1 answer

How do I define hexadecimal RBG triplets for ZSH?

According to the ZSH manual, for ZSH V5.1+ colors should be able to be defined as a # followed by an RGB color code as a hexadecimal triplet, for eg. #ff00ff. However, I have found no documentation that provides a concrete example to demonstrate how…
Jaybee
  • 41
  • 6
2
votes
1 answer

zsh using prezto startup prompt extremely slow

I'm using zsh with prezto. The startup prompt is extremely slow. I use iTerm2 on Mac. Here is my ~/.zshrc # # Executes commands at the start of an interactive session. # # Authors: # Sorin Ionescu # # Source Prezto. if…
tsaebeht
  • 1,570
  • 5
  • 18
  • 32
2
votes
4 answers

How to add pipenv to the PATH in my .zshrc

I'm trying to work with pipenv and I installed it using pip, however whenever I run any command starting with pipenv, I get the following error: zsh: command not found: pipenv I know I should add it to my path somehow but I'm not entirely familiar…
Michael Flor
  • 21
  • 1
  • 2
  • 3
2
votes
0 answers

GNU screen dynamic title

I have a setting that works on one computer (Linux mint 18.3 sylvia) and not on another one (Ubuntu 14.04.5 LTS) and I don't really know what to check to find the problem : I'm using GNU screen and I put the name of each window, which change…
hugogogo
  • 501
  • 4
  • 24
2
votes
0 answers

How to attach to an existing byobu session or start a new one if there is no session when starting terminal emulator?

I'm using zsh and byobu (using the tmux backend). In my .zshrc file I put the following: if which byobu >/dev/null 2>&1; then # if not inside a byobu session, and if no session is started, # start a…
Pierre
  • 402
  • 3
  • 13
2
votes
2 answers

How to setup prompt with three nearest folders ../c/Users/test

Here's a sample: ../c/Users/test I stil have no idea how to achieve this zsh's prompt, if possible also how it will be in bash? EDIT: the nearest means my pwd will show for i.e: /home/abc/c/Users/test. If I'm under /home/abc/c or /home/abc or /home,…
Tuyen Pham
  • 300
  • 3
  • 14
2
votes
0 answers

How to stop zsh printing Ruby version on every command?

Since I have installed rbenv using homebrew on macOS High Sierra 10.13.2, the Terminal application that is configured to use zsh keeps printing Ruby version currently selected by rbenv on every executed command in the right side of every line…
Dawid
  • 763
  • 1
  • 8
  • 17
2
votes
1 answer

zsh prompt adam2 - script output without newline, is not being displayed

I'm using adam2 prompt on iterm2 terminal on mac for last 5 years and only today it struck to me that the scripts which produce output without a trailing newline character, is not being displayed. For example: (1) This doesn't display any output:…
codeplay
  • 61
  • 7
2
votes
1 answer

history expansion not working in .zshrc functions

I created a function clip that copies the output of the last command to clipboard by rerunning it first. #copy previous output to clipboard function clip(){ echo $(!!) | pbcopy } When I run the individual line contained in the function in my…
Tim Nederveen
  • 135
  • 1
  • 12
2
votes
0 answers

expand an environment variable in zsh command prompt dynamically

I'd like a prompt in zsh which is showing the actual state of a certain environment variable. Right now I am using the below method, but it is evaluating the variable only once when zsh is started up and when the value of the variable changes the…
LWNirvana
  • 47
  • 10
2
votes
1 answer

Can zsh complete command flags?

Is there some way to get zsh to complete long flag names on the command line? $ command --reall $ command --really-long-flag-name Seems like a zshy thing to do.
Sasgorilla
  • 2,403
  • 2
  • 29
  • 56
2
votes
0 answers

Terminal zsh commands stopped working suddenly

I was attempting to update my npm version and suddenly received errors and now my zsh commands stopped working. I attempted to move the PATH but noticed my path is strangely massive... How do i reset zsh and correct my path? Path: $ echo…
chaneyz
  • 95
  • 1
  • 1
  • 6
2
votes
2 answers

zsh: command not found: grunt-init

I'm new to gruntjs and am trying to get the grunt-init templates up and running however I constantly get this error: zsh: command not found: grunt-init when I run the install it shows me all of this, so it seems like it is installing fine → npm…
JSturgessMeyers
  • 85
  • 1
  • 2
  • 11
2
votes
2 answers

Weird behaviour with zsh PATH

I just encourage a weird problem with zsh today. My environment is Mac OS X Yosemite, zsh 5.0.5 (x86_64-apple-darwin14.0) In .zshrc, I have manually set the PATH variable to something like export PATH="$PATH:~/.composer/vendor/bin" Try echo $PATH…
DQM
  • 562
  • 3
  • 15