-
Notifications
You must be signed in to change notification settings - Fork 0
/
zsh.nix
34 lines (33 loc) · 961 Bytes
/
zsh.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ config, ... }:
{
programs.zsh = {
enable = true;
enableAutosuggestions = true;
oh-my-zsh = {
enable = true;
plugins = [ "vi-mode" "per-directory-history" "pass" ];
};
shellAliases = {
ll = "ls -a";
"." ="cd ..";
".." = "cd ../..";
"..." = "cd ../../..";
"...." = "cd ../../../..";
};
initExtra = ''
export VISUAL='vim'
export PATH=~/checkpad/checkpad-ssh:$PATH
vterm_printf(){
if [ -n "$TMUX" ] && ([ "''${TERM%%-*}" = "tmux" ] || [ "''${TERM%%-*}" = "screen" ] ); then
# Tell tmux to pass the escape sequences through
printf "\ePtmux;\e\e]%s\007\e\\" "$1"
elif [ "$''${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf "\eP\e]%s\007\e\\" "$1"
else
printf "\e]%s\e\\" "$1"
fi
}
'';
};
}