Tag Info

Hot answers tagged

2

Bart Schaefer proposed the following approach to the same question on the zsh users mailing list: zshaddhistory() { whence ${${(z)1}[1]} >| /dev/null || return 1 } This function is executed before the command line is written to history. If it does return 1, the current command line is neither appended to the history file nor to the local history ...


1

But I want to know if I should be ignoring .bash_profile and those other files, and putting everything into the .zshrc file? A lot of instructions online for installation or system set-up stuff have me adding stuff to .bash_rc, etc. I assume if I’m into using zsh, I should be putting that stuff in .zshrc? This webpage explains the differences ...


1

You probably want to save your customisations in ~/.zshrc. ~/.zshrc is always executed when zsh starts (both interactive logins and non-interactive logins). See the Installation and Configation document at Zsh for more information and links to example configuration files.


1

.zshrc-e means zshrc e(xample) file.


1

In recent versions of gnome-terminal, you can use the following escape sequences to change the cursor: \e[ q: reset to whatever's defined in the profile settings \e[1 q: blinking block \e[2 q: steady block \e[3 q: blinking underline \e[4 q: steady underline \e[5 q: blinking I-beam \e[6 q: steady I-beam You can print these by e.g. echo -ne '\e[5 q'. Hook ...


1

You need to enable the AUTO_NAME_DIRS option in your Zsh configuration setopt autonamedirs it has to happen before you set PROJ. Alternatively, if you do not need PROJ for anything other than switching (and displaying) paths in Zsh, you can set hash -d PROJ=$HOME/project Explanation: The feature you are using is called "Static named directories". ...


1

You are using single quotes, so bash won't expand '!!'. Try using double quotes instead, resulting in something like: mjost@tuca:~$ echo hello hello mjost@tuca:~$ echo "!!" > file echo "echo hello" > file mjost@tuca:~$ cat file echo hello mjost@tuca:~$ Anyway, you might want to take a look at a more complete answer with all different possible ...



Only top voted, non community-wiki answers of a minimum length are eligible