Skip to main content

All Questions

Tagged with
0 votes
0 answers
43 views

How to use ".zsh" files? [duplicate]

This might be a very silly question, but how to use .zsh files? For example, here is a gist system-wide-clipboard.zsh Zsh copy & paste system wide for OS X, like in emacs I do understand I can ...
jsx97's user avatar
  • 73
1 vote
2 answers
208 views

Why not run zsh-newuser-install as root?

My user shell is zsh, but sometimes I need to wander about as root, where my shell customizations (prompts, aliases, etc.) don't come with me. So I thought if I'm going to be adding those all, I might ...
404 Name Not Found's user avatar
5 votes
2 answers
2k views

Source not working the same way for bash as for zsh, cannot forward source commands as expected

I have been using bash at work and zsh at home, different macbooks. I know very little bash or zsh scripting, so I didn't dare do the switch until I managed to get my ZSH on par with what I had at ...
Kalec's user avatar
  • 153
3 votes
1 answer
177 views

git: inconsistent behavior when using filter to strip comments

I am using filter to remove comments before committing config files in git: $ cat .git/config [filter "stripcomments"] clean = "stripcomments" $ cat .git/info/attributes /etc/* ...
Martin Vegter's user avatar
2 votes
1 answer
2k views

setopt does not work in .zshrc. Can someone tell me why?

This is what I have in ~/.zshrc (actually a file sourced from my ~/.zshrc, see below). #CHANGING DIRECTORIES setopt CD_SILENT setopt CDABLE_VARS setopt AUTO_CD #COMPLETION setopt recexact autolist ...
Pragmatic's user avatar
2 votes
1 answer
720 views

Create parent directories when using shell redirect

In Zsh, the following fails: $ echo hi > /tmp/this/path/does/not/exist/out.txt zsh: no such file or directory: /tmp/this/path/does/not/exist/out.txt Obviously the problem is that > cannot ...
Bagalaw's user avatar
  • 945
0 votes
1 answer
154 views

Set custom shell history file [duplicate]

How to set an alternative path for the zsh history file instead of the default ~/.zsh_history?
Scrooge McDuck's user avatar
1 vote
2 answers
2k views

How can I change the location of .xinitrc and .zsh* files

I want to change the location of .xinitrc, .zshrc and .zshenv to ~/.config/x/xinitrc, ~/.config/zsh/zshrc and ~/.config/zsh/zshenv, but without simlinking them. How can I achieve this? Do I have to ...
user avatar
3 votes
2 answers
2k views

How to run a command every time that I exit a zsh shell (including non-login shells)

I have been trying to run a command to clean up some of my temporary files every time I exit a shell. I initially thought that this would be the job of .zlogout but it doesn't seem to be executed if I,...
ITChap's user avatar
  • 197
4 votes
4 answers
10k views

Recover overwritten .zshrc with still-running zsh

I accidentally overwrote my .zshrc file after a misexecuted command, which contains several hundred lines of configs. However, I still have 5 terminals that had zsh open before this incident, and as a ...
JS4137's user avatar
  • 185
2 votes
1 answer
9k views

What are "zsh" commands for cut/copy/paste?

I want to configure zsh and bind its cutting, copying and pasting commands (or maybe they're called widgets idk) to different escape sequences, the ones that my terminal program sends across. Problem ...
8c6b5df0d16ade6c's user avatar
0 votes
1 answer
1k views

Configuration file for shell script?

Is it possible to define a configuration file for zsh scripts? I am running macOS 10.15 and the default shell is zsh. I have defined, i.e., alias abc="echo yes" in ~/.zshrc, ~/.zsh_profile, ~...
Jordan He's user avatar
  • 103
0 votes
2 answers
3k views

Convert this particular .bash_profile to .zprofile

I have this .bash_profile: alias ip='ipconfig getifaddr en0' PS1="\[\e[0;31m\]\$ \[\e[0;32m\]\w\[\e[0m\] : " export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s ...
Vladimir Gerasimenko's user avatar
3 votes
1 answer
425 views

How do configure ZSH commands substition to not use backticks (`)?

I only want echo $(date) to return the date not the backticked version. echo $(date) # should return Wed Mar 6 09:50:41 EST 2019 echo `date` # should return `date`
Josh Beauregard's user avatar
1 vote
1 answer
25k views

what's the difference between /bin/zsh and /usr/bin/zsh? [duplicate]

I saw the following in /etc/shells - % cat /etc/shells # /etc/shells: valid login shells /bin/sh /bin/dash /bin/bash /bin/rbash /bin/zsh /usr/bin/zsh I want to know if there is a difference ...
shirish's user avatar
  • 12.5k

15 30 50 per page