-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc
More file actions
56 lines (42 loc) · 1.36 KB
/
.zshrc
File metadata and controls
56 lines (42 loc) · 1.36 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
eval "$(starship init zsh)"
# Enable Zsh completion system
autoload -Uz compinit
compinit
eval "$(zoxide init zsh)"
# alias cd="z"
alias rev="/home/mikku/.cargo/bin/rev"
alias git-purge="git fetch -p && git branch --merged | grep -v '*' | grep -v 'master' | xargs git branch -d"
if command -v zoxide &>/dev/null; then
zd() {
local old=$PWD
if [[ $# -eq 0 ]]; then
builtin cd ~ || return
elif [[ -d "$1" ]]; then
builtin cd "$1" || return
else
z "$@" || { print -P "%F{red}Error:%f Directory not found"; return 1; }
fi
local new=$PWD
if [[ "$old" != "$new" ]]; then
# show arrow and current path
printf " \U000F17A9 "
print -P "%F{cyan}${new/#$HOME/~}%f"
fi
}
alias cd="zd"
fi
# Directories
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias ls="eza -l --no-permissions --icons --color=always --sort=created --group-directories-first"
alias cat="bat"
alias hx="helix"
export PATH=$PATH:/usr/local/go/bin
# . "$HOME/.cargo/env"
export PATH="$HOME/.cargo/bin:$PATH"
#alias ls="fview -u=m -r"
source ~/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.zsh/fzf-tab/fzf-tab.plugin.zsh
if [ -e /home/mikku/.nix-profile/etc/profile.d/nix.sh ]; then . /home/mikku/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer