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
0
votes
0 answers

pman() function from bash in zsh

I've got this neat little function to open man pages in the Preview.app in my bash profile pman() { man -t $@ | open -f -a /Applications/Preview.app } and I want to use it in my zshrc but it doesn't work does anybody know how to fix it?…
0
votes
1 answer

grml's zsh config - multiline command re-echoing

I installed grml's configuration files and something in those files seems to be causing multiline commands to re-echo themselves before executing. For example user@machine ~ % cat << EOF \`heredoc> this \`heredoc> that \`heredoc>…
Roy Lamperado
  • 101
  • 1
  • 5
0
votes
1 answer

tmux does not retain $PATH

I am using chruby to manage changing my rubies. I also use tmux. When I change to a different Ruby, chruby updates the PATH environment variable to include the path to the Ruby I want. When I start a tmux session, these modifications to PATH are…
jordelver
  • 8,292
  • 2
  • 32
  • 40
0
votes
1 answer

Zsh Mac OSx Mountain Lion vim promt

I am wondering if anybody is able to get the vim prompt working properly using Mac OSx Mountain Lion the latest version. I am able to edit in vim mode on the command line but I have seen with zsh before that you can go into Vim mode which launches a…
Jacob Waller
  • 4,119
  • 3
  • 26
  • 32
0
votes
1 answer

locate + grep variable in bash function

zsh: 4.3.17 GNU bash: 4.2.24 GNU grep: 2.10 I would like to know what I did wrong in the grep part -> why grep doesn't highlight the results when used inside the .zshrc file, actually it doesn't output something at all. When not using a variable or…
Paradiesstaub
  • 2,590
  • 2
  • 18
  • 28
0
votes
1 answer

Auto attach to gnu screen on remote host (ssh) only

So I distribute my dotfiles on all my machines. I want to put something like the following in my .zshrc # Autoload screen if we aren't in it. if [[ $STY = '' ]] then screen -xR; fi Which I got from What's in your .zshrc? But I only want to attach…
Mark
  • 4,446
  • 5
  • 26
  • 34
-1
votes
1 answer

How can I permanently remove an added alias from zsh (MacOS Terminal)?

I'm using MacOS and had the issue that my Terminal didn't react to the 'python' command, so I tried out what was recommended here (manually adding an alias to zsh with echo "alias python=/usr/bin/python3" >> ~/.zshrc). Turned out this wasn't the…
bs90
  • 1
  • 2
-1
votes
1 answer

Is it possible to make a shell function auto-complete a path by pressing tab?

I have a very simple shortcut function for accessing project folders in my workspace: function cdw() { cd ~/workspace/$1 } I'd really love if I could get this to auto-complete the folder name. Is it possible, if so, how can I do it?
mal
  • 3,022
  • 5
  • 32
  • 62
-1
votes
1 answer

Create .zshrc file for aliases

i am trying to create permanent alias on my mac terminal. The file .zshrc is not present so i need to create it myself. I have create the file and added the following alias as test alias ll='ls -la' But when i run the command ll it is recognized.…
-1
votes
1 answer

How do I set an entry to PATH in .zshrc based on the user's CPU architecture?

My colleagues and I use the same .zshrc file. We would like it to automatically set an entry to PATH if the user has an M1 macbook which has a different way of installing a package (ansible in this case) compared to Intel based macs. If user has an…
SWHJ
  • 344
  • 2
  • 10
-1
votes
1 answer

My $PATH exists but a .zshrc file does not exist, given the anomalies below, where can I find the existing $PATH file?

Confused about how to find my $PATH file to edit it When I type $PATH I get back zsh: no such file or directory: /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin which is strange it says "no such file or directory"…
-1
votes
1 answer

ZSH Completions based on a directory, works after only after 'exec zsh'

for example, when i start terminal and type brew install spot and press TAB - nothing, only dir like a Desktop/, but when i exec zsh everything magically starts working
finegorko
  • 57
  • 8
-1
votes
1 answer

zsh: "reload:4 = not found" for function named "reload"

I'm trying to make a shortcut for myself to reload a site on a server, so I'm getting the site name via regex, and then trying to have zsh run a command to reload with the correct parameters. I've tried numerous variations on this but I keep getting…
MaxRocket
  • 920
  • 1
  • 12
  • 26
-1
votes
1 answer

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 [ ! -d ~/Desktop/Notes ];then mkdir…
Santhosh Pai
  • 1
  • 1
  • 1
-1
votes
1 answer

Compare same type of files from 2 diferent directories : zshrc function

I have posted a long time ago a question about how to compare same type (extension) files from 2 different directories: Issue with wildcards into arguments of a Bash function Under bash shell, everything is working fine but now, I am under zsh shell…
user1773603