-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
52 lines (43 loc) · 1.32 KB
/
dot_zshrc
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
# Enable History:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
# Basic auto/tab complete:
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
_comp_options+=(globdots)
#Add .NET Core SDK tools
export PATH="$PATH:/home/insidious_flames/.dotnet/tools/"
# Use lf to switch directories and bind it to ctrl-o:
lfcd () {
cd "$(lf -print-last-dir)"
local precmd
for precmd in $precmd_functions; do
$precmd
done
zle reset-prompt
}
zle -N lfcd
bindkey '^o' lfcd
# Reverse Search
fzf-reverse-command-search () {
BUFFER="$( ([ -n \"$ZSH_NAME\" ] && fc -l 1 || history) | fzf +s --tac | sed -E 's/ *[0-9]*\*? *//' | sed -E 's/\\/\\\\/g')"
zle reset-prompt
zle end-of-line
}
zle -N fzf-reverse-command-search
bindkey "^r" fzf-reverse-command-search
# Aliases:
alias neofetch="neofetch --backend kitty --source ~/Pictures/shell.png --image_size 500"
alias ssh="kitten ssh"
# Enable Oh-My-Posh
eval "$(oh-my-posh init zsh --config ~/.config/ohmyposh/config.toml)"
# Zsh Syntax Highlighting Colors
typeset -gA ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=white'
ZSH_HIGHLIGHT_STYLES[path]='fg=magenta'
# Enable Syntax Highlighting (Needs to be last):
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
neofetch