dotfiles/.zshrc
Jeffrey Serio 757cce1bc4 Update
2022-09-13 08:37:45 -05:00

86 lines
2.7 KiB
Bash

# Filename : ~/.zshrc
# Purpose : setup file for zsh
# Author : Jeffrey Serio <hyperreal@fedoraproject.org>
# Homepage : https://hyperreal.coffee
#
# Zsh Manual - https://zsh-manual.netlify.app
# Zsh Guide - https://zsh-guide.netlify.app
#
# ,----[ man -k zsh ]
# |
# | zsh (1) - the Z shell
# | zshall (1) - the Z shell meta-man page
# | zshbuiltins (1) - zsh builtin commands
# | zshcalsys (1) - zsh calendar system
# | zshcompctl (1) - zsh programmable completion
# | zshcompsys (1) - zsh completion system
# | zshcompwid (1) - zsh completion widgets
# | zshcontrib (1) - user contributions to zsh
# | zshexpn (1) - zsh expansion and substitution
# | zshmisc (1) - everything and then some
# | zshmodules (1) - zsh loadable modules
# | zshoptions (1) - zsh options
# | zshparam (1) - zsh parameters
# | zshroadmap (1) - informal introduction to the zsh manual
# | zshtcpsys (1) - zsh tcp system
# | zshzftpsys (1) - zftp function front-end
# | zshzle (1) - zsh command line editor
# `----
#
# Zsh startup sequence
# 1) /etc/zshenv -> Always run for every zsh. (login + interactive + other)
# 2) ~/.zshenv -> Usually run for every zsh. (login + interactive + other)
# 3) /etc/zprofile -> Run for login shells. (login)
# 4) ~/.zprofile -> Run for login shells. (login)
# 5) /etc/zshrc -> Run for interactive shells. (login + interactive)
# 6) ~/.zshrc -> Run for interactive shells. (login + interactive)
# 7) /etc/zlogin -> Run for login shells. (login)
# 8) ~/.zlogin -> Run for login shells. (login)
#
# This file is based on Christian Schneider's zsh configuration
# https://www.strcat.de/dotfiles
# Plugins
if ! test -f ~/.zplug/init.zsh; then
export ZPLUG_HOME=~/.zplug
git clone https://github.com/zplug/zplug $ZPLUG_HOME
fi
source ~/.zplug/init.zsh
# Load file from ~/.zshrc.d
zplug "~/.zshrc.d", from:local, use:'*'
# Use autosuggestions when typing commands
zplug "zsh-users/zsh-autosuggestions"
# Use a keybinding to complete parts of command from the history file
zplug "zsh-users/zsh-history-substring-search"
# Use syntax highlighting when typing commands
zplug "zsh-users/zsh-syntax-highlighting", defer:2
# Press escape twice to prepend `sudo` to the command line
zplug "plugins/sudo", from:oh-my-zsh
# systemd aliases
zplug "plugins/systemd", from:oh-my-zsh
# Directory bookmarks using FZF
zplug "urbainvaes/fzf-marks"
if ! zplug check; then
zplug install;
exec $SHELL $SHELL_ARGS "$@"
fi
zplug load
# lscolors.sh
export LS_COLORS=$(cat ~/.lscolors.sh)
# starship.rs prompt
eval "$(starship init zsh)"
# vim:set ft=zsh ai et sw=4 ts=4: