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

Move All Dotfiles Out of Root Directory

I'm am running macOS Sierra, and am in the process of moving all dotfiles into one directory. I have successfully exported many environment variables for various installations (vagrant, composer, oh-my-zsh etc) that allow me to install to a…
7
votes
1 answer

Export of PYTHONPATH from .zshrc not working

I'm trying to export the PYTHONPATH environment variable from my .zshrc, but fails. relevant lines from .zshrc PYTHONPATH="/Users/nicolas/Code:/Users/nicolas/Code/Dashboard" export $PYTHONPATH ** from the command line ** 1] test one echo…
knightofni
  • 1,906
  • 3
  • 17
  • 22
7
votes
3 answers

Why does virtualenv inherit $PYTHONPATH from my shell?

So I'm migrating all my tools from python2 to python3.4 on an Ubuntu 14.04 machine. So far I've done the following: aliased python to python3 in my zshrc for just my user installed pip3 on the system itself (but I'll just be using virtualenvs for…
brianclements
  • 879
  • 2
  • 8
  • 14
6
votes
2 answers

ZSH script and prompt profiling?

This answer, "How to profile a bash shell script?", seems to nearly perfectly cover what I'm trying to accomplish here. I currently have some zsh scripts that modify the prompt, however I think some updates to oh-my-zsh have evoked some issues that…
ylluminate
  • 12,102
  • 17
  • 78
  • 152
6
votes
3 answers

zsh: Command not found (for $EDITOR)

For whatever reason, zsh doesn't like me setting command-line arguments for my $EDITOR variable, but from what I can tell, it's not supposed to be this way. I've seen people use export EDITOR='open -Wn' in their ~/.zshrc file, but when I try to do…
Itai Ferber
  • 28,308
  • 5
  • 77
  • 83
6
votes
1 answer

ZSH auto-complete screws up command name

When I start doing tab auto-complete of a command, it keeps what I initally typed next to it and the command becomes unreadable. In the example below, I typed 'git che' and hit tab. Once I select 'checkout' the command prompt becomes 'git che git…
Chris
  • 455
  • 5
  • 10
6
votes
1 answer

zsh_history stores non-ascii character with strange encoding

When I open my .zsh_history file, I found that some non-ascii characters in my history have strange encoding or something like that. Here is a minimal example: First, the .zshrc is # zshrc HISTSIZE=10000 SAVEHIST=10000 HISTFILE=~/.zsh_history I…
Omelet
  • 91
  • 5
6
votes
2 answers

Not sure where to put completions with Oh My Zsh

I'm using zsh and oh my zsh, and I'm a bit confused about where to put completion files. For example, when installing kind, I'm doing this: brew install kind kind complete zsh > ~/.oh-my-zsh/cache/completions/_kind And I expect that completions for…
Joel
  • 8,502
  • 11
  • 66
  • 115
6
votes
1 answer

How can I have zsh exclude certain commands from history?

Like, say, those that include the word "production"?
John Bachir
  • 22,495
  • 29
  • 154
  • 227
6
votes
1 answer

zsh - command not found for written script

I am using mac and I have a script file print_hello: #!/bin/bash echo hello and if I run it directly from directory with ./print_hello command and zsh terminal it will properly print hello. I would like to add it as a global command, so then…
Mateusz
  • 1,163
  • 2
  • 13
  • 25
6
votes
2 answers

zsh alias expansion

Is it possible to configure zsh to expand global aliases during tab completion? For example, I have the common aliases: alias -g '...'='../..' alias -g '....'='../../..' but when I type, for example, cd .../some it won't expand to cd…
Bryan Ward
  • 6,443
  • 8
  • 37
  • 48
6
votes
1 answer

Modify oh my zsh default command prompt to have complete path for current directory

I want to modify oh my zsh default command prompt to have complete path for current directory from home. I want : ➜ ~/parentFolder/myFolder git:(master) instead of : ➜ myFolder git:(master)
Moebius
  • 6,242
  • 7
  • 42
  • 54
6
votes
1 answer

HISTIGNORE not working in zsh

I have added export HISTIGNORE="ls:cd:pwd:exit:cd .." to my .zshrc file. Deleted .zsh_history and restarted terminal but it still wont ignore those commands.
tgreen
  • 1,720
  • 1
  • 16
  • 28
6
votes
1 answer

port command not found

I am trying to install XFig and found this post. But when I tried to sudo port selfupdate I get the error sudo: port: command not found. I am using zsh and tried to modify the path according to this in both .zshrc and .bash_profile but still no…
chintan s
  • 6,170
  • 16
  • 53
  • 86
6
votes
1 answer

Zsh: How to force file completion everywhere following a set of characters?

I'm trying to figure out how to get file completion to work at any word position on the command line after a set of characters. As listed in a shell these characters would be [ =+-\'\"()] (the whitespace is tab and space). Zsh will do this, but…
jan
  • 181
  • 2
  • 7