diff options
author | Toby Vincent <tobyv13@gmail.com> | 2023-02-11 16:24:14 -0600 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2023-02-11 16:24:14 -0600 |
commit | 17fa2c0a74f0129c622f38879dac9f7d2e3a4aa0 (patch) | |
tree | 90f3bd4ddadaf982b0dfb8665ae04bf6982b3c8a /zsh/.local/share | |
parent | 63393e63d474b9197d484edaa2d82c02aa865aa1 (diff) |
feat: split `.zshrc` to individual files
split `$XDG_CONFIG_HOME/zsh/.zshrc` up into
`$XDG_CONFIG_HOME/zsh/.zshrc.d/*`. This allows for better management
and prioritization between different tool's env. Similar to what was
done to `.profile` in e712243 (feat: split `.profile` to individual
files, 2023-02-10).
Diffstat (limited to 'zsh/.local/share')
-rwxr-xr-x | zsh/.local/share/zsh/plugins/compinit.plugin.zsh | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/zsh/.local/share/zsh/plugins/compinit.plugin.zsh b/zsh/.local/share/zsh/plugins/compinit.plugin.zsh deleted file mode 100755 index e213248..0000000 --- a/zsh/.local/share/zsh/plugins/compinit.plugin.zsh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/zsh - -# Load all stock functions (from $fpath files) called below. -autoload -U compaudit compinit - -# Figure out the SHORT hostname -if [[ "$OSTYPE" = darwin* ]]; then - # macOS's $HOST changes with dhcp, etc. Use ComputerName if possible. - SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*/} -else - SHORT_HOST=${HOST/.*/} -fi - -# Save the location of the current completion dump file. -ZSH_COMPDUMP="${XDG_CACHE_HOME}/zsh/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}" -mkdir -p "${XDG_CACHE_HOME}/zsh" - -# Construct zcompdump metadata, we will rebuild the Zsh compdump if either -# this file changes or the fpath changes. -zcompdump_revision="#revision: $(sha1sum $0:A)" -zcompdump_fpath="#fpath: $fpath" - -# Delete the zcompdump file if zcompdump metadata changed -if ! command grep -q -Fx "$zcompdump_revision" "$ZSH_COMPDUMP" 2>/dev/null \ - || ! command grep -q -Fx "$zcompdump_fpath" "$ZSH_COMPDUMP" 2>/dev/null; then - command rm -f "$ZSH_COMPDUMP" - zcompdump_refresh=1 -fi - -# If the user wants it, load from all found directories -compinit -u -C -d "${ZSH_COMPDUMP}" - -# Append zcompdump metadata if missing -if (( $zcompdump_refresh )); then - echo "\n$zcompdump_revision\n$zcompdump_fpath" >>! "$ZSH_COMPDUMP" -fi - -unset zcompdump_revision zcompdump_fpath zcompdump_refresh |