2023-01-24 10:34:13 +00:00
|
|
|
# Inferencium
|
2022-10-16 09:18:23 +01:00
|
|
|
# ZSH - rc
|
|
|
|
|
2023-02-13 18:30:13 +00:00
|
|
|
# Copyright 2022-2023 Jake Winters
|
2023-03-05 00:45:46 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
2022-10-16 09:18:23 +01:00
|
|
|
|
2023-04-06 18:25:36 +01:00
|
|
|
# Version: 7.2.2.20
|
2022-10-16 10:41:25 +01:00
|
|
|
|
2022-10-16 09:18:23 +01:00
|
|
|
|
2023-04-06 16:07:46 +01:00
|
|
|
# Temporarily export variables until permanent solution is found
|
2023-02-12 14:51:34 +00:00
|
|
|
export LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"
|
|
|
|
|
2023-03-01 01:46:35 +00:00
|
|
|
# Prompt
|
2023-04-06 16:11:01 +01:00
|
|
|
PROMPT="%n@%M - %~/ : %# "
|
2023-04-06 18:01:18 +01:00
|
|
|
RPROMPT=\$vcs_info_msg_0_
|
2022-10-16 09:18:23 +01:00
|
|
|
|
2023-03-01 01:46:35 +00:00
|
|
|
# Options
|
2023-04-06 18:01:18 +01:00
|
|
|
setopt extendedglob KSH_ARRAYS nomatch prompt_subst
|
2022-10-16 09:18:23 +01:00
|
|
|
unsetopt autocd AUTO_REMOVE_SLASH beep
|
|
|
|
|
2023-03-01 01:46:35 +00:00
|
|
|
# Keybinds
|
2022-10-16 09:18:23 +01:00
|
|
|
bindkey -e
|
2023-01-07 21:58:14 +00:00
|
|
|
bindkey "^[[3" delete-char
|
|
|
|
bindkey "^[[H" beginning-of-line
|
|
|
|
bindkey "^[[F" end-of-line
|
2022-10-16 09:18:23 +01:00
|
|
|
|
2023-03-01 01:46:35 +00:00
|
|
|
# zstyle
|
2022-10-16 09:18:23 +01:00
|
|
|
zstyle :compinstall filename '~/.zshrc'
|
|
|
|
zstyle ':completion:*' menu select
|
2023-04-06 18:25:36 +01:00
|
|
|
zstyle ':vcs_info:git:*' formats '%r%f (%b)'
|
2023-04-06 18:01:18 +01:00
|
|
|
zstyle ':vcs_info:*' enable git
|
2022-10-16 09:18:23 +01:00
|
|
|
|
|
|
|
autoload -Uz compinit
|
|
|
|
compinit
|
2023-04-06 18:01:18 +01:00
|
|
|
autoload -Uz vcs_info
|
|
|
|
|
|
|
|
precmd_vcs_info() { vcs_info }
|
|
|
|
precmd_functions+=( precmd_vcs_info )
|
2022-10-16 09:18:23 +01:00
|
|
|
|
2023-03-01 01:46:35 +00:00
|
|
|
# History
|
2022-10-16 09:18:23 +01:00
|
|
|
HISTFILE=~/.zsh-history
|
|
|
|
HISTSIZE=1024
|
|
|
|
SAVEHIST=1024
|
|
|
|
|
2023-03-01 01:46:35 +00:00
|
|
|
# XDG_RUNTIME_DIR
|
2022-11-19 17:11:11 +00:00
|
|
|
if test -z "${XDG_RUNTIME_DIR}"; then
|
|
|
|
export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
|
|
|
|
if ! test -d "${XDG_RUNTIME_DIR}"; then
|
|
|
|
mkdir "${XDG_RUNTIME_DIR}"
|
|
|
|
chmod 0700 "${XDG_RUNTIME_DIR}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2022-10-16 09:18:23 +01:00
|
|
|
# Aliases.
|
2023-03-01 01:46:35 +00:00
|
|
|
## Global
|
2022-12-08 14:39:01 +00:00
|
|
|
if [[ -f ~/.zsh-alias-global ]]; then
|
|
|
|
. ~/.zsh-alias-global
|
2022-10-16 09:18:23 +01:00
|
|
|
fi
|
2023-03-01 01:46:35 +00:00
|
|
|
## User
|
2022-12-10 13:24:59 +00:00
|
|
|
if [[ -f ~/.zsh-alias-user ]]; then
|
|
|
|
. ~/.zsh-alias-user
|
|
|
|
fi
|