nvim oil, shell aliases, zsh tweaks
This commit is contained in:
42
.zshrc
42
.zshrc
@@ -3,6 +3,7 @@
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
else;
|
||||
fi
|
||||
|
||||
source ~/.profile
|
||||
@@ -18,6 +19,7 @@ xset b off
|
||||
autoload -Uz compinit # load completion
|
||||
compinit
|
||||
_comp_options+=(globdots) # Include hidden files.
|
||||
eval "$(zoxide init zsh)"
|
||||
setopt autocd # allow cd by only entering directory without cd command
|
||||
setopt extendedglob # Extended globbing. Allows using regular expressions with *
|
||||
setopt correct # Auto correct mistakes
|
||||
@@ -122,7 +124,7 @@ source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh # l
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#737373,bg=translucent"
|
||||
|
||||
|
||||
|
||||
source <(fzf --zsh)
|
||||
|
||||
#random stuff
|
||||
|
||||
@@ -131,41 +133,3 @@ source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh # l
|
||||
#zstyle ':completion:*' original true
|
||||
|
||||
#zstyle :compinstall filename '/home/en/.zshrc'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if [[ -f ~/.dircolors ]] ; then
|
||||
# eval $(dircolors -b ~/.dircolors)
|
||||
#elif [[ -f /etc/DIR_COLORS ]] ; then
|
||||
# eval $(dircolors -b /etc/DIR_COLORS)
|
||||
#fi
|
||||
#
|
||||
function command_not_found_handler {
|
||||
local purple='\e[1;35m' bright='\e[0;1m' green='\e[1;32m' reset='\e[0m'
|
||||
printf 'zsh: command not found: %s\n' "$1"
|
||||
local entries=(
|
||||
${(f)"$(/usr/bin/pacman -F --machinereadable -- "/usr/bin/$1")"}
|
||||
)
|
||||
if (( ${#entries[@]} ))
|
||||
then
|
||||
printf "${bright}$1${reset} may be found in the following packages:\n"
|
||||
local pkg
|
||||
for entry in "${entries[@]}"
|
||||
do
|
||||
# (repo package version file)
|
||||
local fields=(
|
||||
${(0)entry}
|
||||
)
|
||||
if [[ "$pkg" != "${fields[2]}" ]]
|
||||
then
|
||||
printf "${purple}%s/${bright}%s ${green}%s${reset}\n" "${fields[1]}" "${fields[2]}" "${fields[3]}"
|
||||
fi
|
||||
printf ' /%s\n' "${fields[4]}"
|
||||
pkg="${fields[2]}"
|
||||
done
|
||||
fi
|
||||
return 127
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user