refactor: follow arch linux zsh docs
This commit is contained in:
1 parent
d9d955be70
commit
fd46ba319e
5 files changed
+22
-18
No files matched your search
@@ -1,4 +1,2 @@
|
|||||||
export XDG_CONFIG_HOME="${HOME}/.config"
|
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||||
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
|
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
|
||||||
|
|
||||||
[[ -f $ZDOTDIR/.zshenv ]] && . $ZDOTDIR/.zshenv
|
|
||||||
+17
-10
@@ -3,25 +3,32 @@
|
|||||||
# workaround for vscode terminal
|
# workaround for vscode terminal
|
||||||
[[ -z "${XDG_CONFIG_HOME}" ]] && export XDG_CONFIG_HOME="${HOME}/.config"
|
[[ -z "${XDG_CONFIG_HOME}" ]] && export XDG_CONFIG_HOME="${HOME}/.config"
|
||||||
[[ -z "${ZDOTDIR}" ]] && export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
|
[[ -z "${ZDOTDIR}" ]] && export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
|
||||||
|
HISTFILE="$HOME"/.zsh_history
|
||||||
|
|
||||||
|
|
||||||
# some useful options (man zshoptions)
|
# some useful options (man zshoptions)
|
||||||
setopt autocd extendedglob nomatch menucomplete
|
setopt AUTO_CD EXTENDED_GLOB NOMATCH MENU_COMPLETE
|
||||||
setopt interactive_comments
|
setopt INTERACTIVE_COMMENTS
|
||||||
stty stop undef # Disable ctrl-s to freeze terminal.
|
stty stop undef # Disable ctrl-s to freeze terminal.
|
||||||
zle_highlight=('paste:none')
|
zle_highlight=('paste:none')
|
||||||
|
|
||||||
# history
|
# history
|
||||||
setopt appendhistory
|
setopt APPEND_HISTORY
|
||||||
setopt incappendhistory # Immediately append commands to history file.
|
setopt INC_APPEND_HISTORY
|
||||||
setopt histignoredups # Never add duplicate entries.
|
setopt HIST_EXPIRE_DUPS_FIRST
|
||||||
setopt histignorespace # Ignore commands that start with a space.
|
setopt HIST_IGNORE_DUPS
|
||||||
setopt histreduceblanks # Remove unnecessary blank lines.
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
setopt HIST_IGNORE_SPACE
|
||||||
|
setopt HIST_FIND_NO_DUPS
|
||||||
|
setopt HIST_SAVE_NO_DUPS
|
||||||
|
|
||||||
|
unsetopt EXTENDED_HISTORY
|
||||||
|
|
||||||
# beeping is annoying
|
# beeping is annoying
|
||||||
unsetopt beep
|
unsetopt BEEP
|
||||||
|
|
||||||
# remove % symbol on prompt
|
# remove % symbol on prompt
|
||||||
unsetopt promptsp
|
unsetopt PROMPT_SP
|
||||||
|
|
||||||
# completions
|
# completions
|
||||||
|
|
||||||
@@ -52,7 +59,7 @@ source "$ZDOTDIR/zsh-functions"
|
|||||||
# Normal files to source
|
# Normal files to source
|
||||||
zsh_add_file "zsh-exports"
|
zsh_add_file "zsh-exports"
|
||||||
zsh_add_file "zsh-aliases"
|
zsh_add_file "zsh-aliases"
|
||||||
zsh_add_file "zsh-prompt"
|
zsh_add_file "zsh-eval"
|
||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
repos=(
|
repos=(
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
# Set PATH, MANPATH, etc., for Homebrew.
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
[ -f /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)"
|
[ -f /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
command -v fnm > /dev/null 2>&1 && eval "$(fnm env --use-on-cd)"
|
command -v fnm > /dev/null 2>&1 && eval "$(fnm env --use-on-cd)"
|
||||||
command -v zoxide > /dev/null 2>&1 && eval "$(zoxide init zsh)"
|
command -v zoxide > /dev/null 2>&1 && eval "$(zoxide init zsh)"
|
||||||
|
command -v starship > /dev/null 2>&1 && eval "$(starship init zsh)"
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
HISTSIZE=1000000
|
HISTSIZE=1000000
|
||||||
|
SAVEHIST=1000000
|
||||||
|
|
||||||
export PATH="$HOME/.local/bin":$PATH
|
|
||||||
export MANWIDTH=999
|
export MANWIDTH=999
|
||||||
export HISTFILE="$ZDOTDIR"/.zsh_history
|
export PATH="$HOME/.local/bin":$PATH
|
||||||
|
|
||||||
export EDITOR="micro"
|
export EDITOR="micro"
|
||||||
export PAGE="bat"
|
export PAGE="bat"
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
command -v starship > /dev/null 2>&1 && eval "$(starship init zsh)"
|
|
||||||
Reference in new issue
Block a user