mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
Fixed typos
This commit is contained in:
parent
e5cf9c01bb
commit
ec5f73fde4
@ -1,5 +1,5 @@
|
|||||||
# Import and execute startup file
|
# Import and execute startup file
|
||||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/zsh/startup" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/zsh/startup"
|
[ -f "$XDG_CONFIG_HOME/zsh/startup" ] && source "$XDG_CONFIG_HOME/zsh/startup"
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
setopt appendhistory # Immediately append history instead of overwriting
|
setopt appendhistory # Immediately append history instead of overwriting
|
||||||
@ -7,10 +7,10 @@ setopt autocd # If only directory path is entered, cd there
|
|||||||
setopt correct # Auto correct mistakes setopt extendedglob # Extended globaling. Allows using regular expressions with *
|
setopt correct # Auto correct mistakes setopt extendedglob # Extended globaling. Allows using regular expressions with *
|
||||||
setopt histignorealldups # If a new command is a duplicate, remove older one
|
setopt histignorealldups # If a new command is a duplicate, remove older one
|
||||||
setopt histignorespace # Don't save commands that start with space
|
setopt histignorespace # Don't save commands that start with space
|
||||||
setopt inc_append_history # Save commands are addded to the history immediately
|
setopt inc_append_history # Save commands are added to the history immediately
|
||||||
setopt nobeep # No beep
|
setopt nobeep # No beep
|
||||||
setopt nocaseglob # Case insensative globbing
|
setopt nocaseglob # Case insensitive globbing
|
||||||
setopt numericglobsort # Sort filenames numeracally when it makse sense
|
setopt numericglobsort # Sort filenames numeracally when it makes sense
|
||||||
|
|
||||||
autoload -U select-word-style
|
autoload -U select-word-style
|
||||||
|
|
||||||
@ -18,8 +18,8 @@ autoload -U select-word-style
|
|||||||
autoload -U colors && colors
|
autoload -U colors && colors
|
||||||
|
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors fr dirs/files/etc)
|
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors fr dirs/files/etc)
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case sensetive TAB completions
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case sensitive TAB completions
|
||||||
zstyle ':completion:*' rehash true # Automaticly find new executables in path
|
zstyle ':completion:*' rehash true # Automatically find new executables in path
|
||||||
# Speed up completions
|
# Speed up completions
|
||||||
zstyle ':completion:*' accept-exact '*(N)'
|
zstyle ':completion:*' accept-exact '*(N)'
|
||||||
zstyle ':completion:*' cache-path ~/.config/zsh/cache
|
zstyle ':completion:*' cache-path ~/.config/zsh/cache
|
||||||
@ -32,14 +32,15 @@ _comp_options+=(globdots) # Include hidden files
|
|||||||
|
|
||||||
HISTSIZE=1000000
|
HISTSIZE=1000000
|
||||||
SAVEHIST=1000000
|
SAVEHIST=1000000
|
||||||
HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
|
HISTFILE="$XDG_CACHE_HOME/zsh/history"
|
||||||
WORDCHARS=${WORDCHARS//\/[&.;]/} # Don't consider certain part of the word
|
WORDCHARS=${WORDCHARS//\/[&.;]/} # Don't consider certain part of the word
|
||||||
|
|
||||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
|
[ -f "$XDG_CONFIG_HOME/shell/aliasrc" ] && source "$XDG_CONFIG_HOME/shell/aliasrc"
|
||||||
|
|
||||||
# theme/plugins
|
# theme/plugins
|
||||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
|
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
|
||||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh 2>/dev/null
|
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh 2>/dev/null
|
||||||
|
source /usr/share/zsh/plugins/zsh-autoswitch-virtualenv/autoswitch_virtualenv.plugin.zsh 2>/dev/null
|
||||||
zmodload zsh/terminfo
|
zmodload zsh/terminfo
|
||||||
|
|
||||||
# Keybindings
|
# Keybindings
|
||||||
@ -49,7 +50,7 @@ bindkey -v
|
|||||||
export KEYTIMEOUT=1
|
export KEYTIMEOUT=1
|
||||||
|
|
||||||
# Change cursor shape for different vi modes.
|
# Change cursor shape for different vi modes.
|
||||||
function zle-keymap-select {
|
zle-keymap-select() {
|
||||||
case $KEYMAP in
|
case $KEYMAP in
|
||||||
vicmd) echo -ne '\e[1 q' ;; # block
|
vicmd) echo -ne '\e[1 q' ;; # block
|
||||||
viins | main) echo -ne '\e[5 q' ;; # beam
|
viins | main) echo -ne '\e[5 q' ;; # beam
|
||||||
@ -65,7 +66,7 @@ echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
|||||||
preexec() { echo -ne '\e[5 q'; } # Use beam shape cursor for each new prompt.
|
preexec() { echo -ne '\e[5 q'; } # Use beam shape cursor for each new prompt.
|
||||||
|
|
||||||
# Run exa on directory change
|
# Run exa on directory change
|
||||||
function cd() {
|
function cd {
|
||||||
new_directory="$*"
|
new_directory="$*"
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
new_directory=${HOME}
|
new_directory=${HOME}
|
||||||
@ -74,16 +75,17 @@ function cd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Use lf to switch directories and bind it to ctrl-o
|
# Use lf to switch directories and bind it to ctrl-o
|
||||||
function lfcd() {
|
lfcd() {
|
||||||
tmp="$(mktemp)"
|
tmp="$(mktemp -uq)"
|
||||||
lfrun -last-dir-path="$tmp" "$@"
|
trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT
|
||||||
|
lf -last-dir-path="$tmp" "$@"
|
||||||
if [ -f "$tmp" ]; then
|
if [ -f "$tmp" ]; then
|
||||||
dir="$(bat "$tmp")"
|
dir="$(cat "$tmp")"
|
||||||
rm -f "$tmp" >/dev/null
|
|
||||||
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Navigate words with CTRL+ARROW keys
|
# Navigate words with CTRL+ARROW keys
|
||||||
bindkey '^H' backward-kill-word # delete previous word with CTRL+BACKSPACE
|
bindkey '^H' backward-kill-word # delete previous word with CTRL+BACKSPACE
|
||||||
bindkey '^[Oc' forward-word
|
bindkey '^[Oc' forward-word
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user