How do I reset and put the zshrc file back to default?

zsh itself does not have a default user configuration. So the default ~/.zshrc is actually no ~/.zshrc. But as you tagged the question with oh-my-zsh I would assume that you want to restore the default oh-my-zsh configuration. For this it should be sufficient to copy templates/zshrc.zsh-template from your oh-my-zsh installation path, usually ~/.oh-my-zsh: cp ~/.oh-my-zsh/templates/zshrc.zsh-template … Read more

ZSH for loop array variable issue

It’s actually much simpler than that: lw=(‘plugin1’ ‘plugin2’ ‘plugin3’) for i in $lw; do . ~/Library/Rogall/plugins/$i/lw.prg end done In summary: Assign to foo, not $foo (the shell would try to expand $foo and assign to whatever it expands to; typically not useful) Use the loop variable directly; it contains the array value rather than the … Read more

Advantages and disadvantages between zsh and emacs’ (e)shell

Regarding M-x eshell: Eshell is not a stand-alone shell; it’s implemented in pure elisp, so can’t be run outside emacs, which is why it’s not one of the standard shells. It doesn’t have its own scripting language like bash/zsh/etc. have; it has elisp, and some command interpretation stuff to make calling elisp a little cleaner. … Read more

How to loop through all the files located under a certain path in zsh?

There is no need to use find. You could try the following: for file in /path/to/directory/**/*(.); do echo $file; done or for file in /path/to/directory/**/*(.); echo $file the ** pattern matches multiple directories recursively. So a/**/b matches any b somewhere below a. It is essentially matches the list find a -name b produces. (.) is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)