Skip to main content

All Questions

Tagged with
1 vote
0 answers
214 views

How to `zcompile` global (system-wide) zsh scripts?

For my local dotfiles I have this snippet at the end of my .zshrc: for f in ~/.zshrc ~/.zshenv ; do [ "${f}"(:A) -ot "$f".zwc ] || zcompile "$f" done This ensures ...
Petr's user avatar
  • 3,173
0 votes
1 answer
220 views

bash automatically executing a tool-specific configuration file on login

My project uses an internal tool on Linux, that uses a file called .spacerc for configuring some environmental variables. The strange thing is, whenever I start a (non-login interactive) bash shell - ...
Yaron Shragai's user avatar
6 votes
1 answer
2k views

zsh - differentiate between source ~/.zshrc and shell initially reading .zshrc

Is there a command or environment variable that I can test for in my ~/.zshrc that that would differentiate between when I run source ~/.zshrc to update my configuration and when the shell reads ~/....
erwin's user avatar
  • 194
4 votes
1 answer
336 views

What does this zsh for syntax mean?

I working on source controlling my dotfiles and a lof of what I'm doing is based off of Zach Holman's dotfiles. I want to source all zsh files like he does in his files but before I just throw the ...
Rumel's user avatar
  • 217
10 votes
2 answers
2k views

Can I keep . and .. out of .* expansion?

I often find it annoying (or worse) when I type command .* in bash and the command applies to the parent directory and current directory. Is there some shell option or other configuration I can ...
David Z's user avatar
  • 6,765
4 votes
2 answers
347 views

shell dotfiles and *rcs: what's a sane setup?

A bash user will eventually end up with .bashrc, .bash_profile, .profile, and maybe some more. Now, each file gets loaded unders particular situations, and it all leads to confusion and frustration. ...
kch's user avatar
  • 2,232