From 0acdc146c41dd9fc9a85674215b4292ac3d2ccdf Mon Sep 17 00:00:00 2001 From: "Lockszmith (VAST@MacBook)" Date: Thu, 17 Apr 2025 15:50:23 -0400 Subject: [PATCH] rearange sz.env and optimize for zsh --- ...ATH_home_bin.env => 001_PATH_home_bin.env} | 0 .../{PATH_node.env => 001_PATH_node.env} | 0 ...H_truestuff.env => 001_PATH_truestuff.env} | 0 .../{aaa_000_term.env => 002_aaa_term.env} | 0 ... 009_stop_on_non_interactive_sessions.env} | 0 ...sh.env.bash => 011_bash_1_ble.sh.env.bash} | 0 ...c.env.bash => 011_bash_1_preexec.env.bash} | 0 .../sz.env/011_zsh_0_perp.env.zsh | 65 +++++++++++++++++ ..._zinit.env.zsh => 011_zsh_2_zinit.env.zsh} | 14 ++-- .../011_zsh_3_completion_system.env.zsh | 7 ++ .../sz.env/{aab_zellij.env => 021_zellij.env} | 0 .../sz.env/031_zsh_4_plugin_vimode.env.zsh | 9 +++ ...-alias.env => 091_load_complete-alias.env} | 0 .../sz.env/091_zsh_9_zinit_fin.env.zsh | 10 +++ ...zz_cleanup.env => 999_PATH_zz_cleanup.env} | 0 .../sz.env/aaa_zsh_0_perp.env.zsh | 69 ------------------- .../aaa_zsh_3_completion_system.env.zsh | 10 --- .../private_dot_config/sz.env/broot.env | 3 +- ...table__.load.sh => executable_000_load.sh} | 6 +- .../sz.env/{zza_lsd.env => ls_1_lsd.env} | 4 +- .../sz.env/{zzb_eza.env => ls_2_eza.env} | 4 +- .../sz.env/{zzz_teleport.env => teleport.env} | 0 .../private_dot_config/sz.env/zza_zoxide.env | 12 ++++ .../{zzy_atuin.env => zzy_atuin.env.bash} | 8 +-- .../sz.env/zzy_atuin.env.zsh | 11 +++ .../sz.env/zzy_chezmoi.env.tmpl | 3 +- ...{aliases.env.tmpl => zzz_aliases.env.tmpl} | 3 +- ...z_bash_post.env => zzz_bash_port.env.bash} | 0 .../sz.env/zzz_zsh_finalize.env.zsh | 6 ++ 29 files changed, 144 insertions(+), 100 deletions(-) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{PATH_home_bin.env => 001_PATH_home_bin.env} (100%) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{PATH_node.env => 001_PATH_node.env} (100%) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{PATH_truestuff.env => 001_PATH_truestuff.env} (100%) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{aaa_000_term.env => 002_aaa_term.env} (100%) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{099_stop_on_non_interactive_sessions.env => 009_stop_on_non_interactive_sessions.env} (100%) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{bbb_ble.sh.env.bash => 011_bash_1_ble.sh.env.bash} (100%) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{bbb_bash_preexec.env.bash => 011_bash_1_preexec.env.bash} (100%) create mode 100644 chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_0_perp.env.zsh rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{aaa_zsh_2_zinit.env.zsh => 011_zsh_2_zinit.env.zsh} (86%) create mode 100644 chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_3_completion_system.env.zsh rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{aab_zellij.env => 021_zellij.env} (100%) create mode 100644 chezmoi.roots/_src.posix/private_dot_config/sz.env/031_zsh_4_plugin_vimode.env.zsh rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{ccc_load_complete-alias.env => 091_load_complete-alias.env} (100%) create mode 100644 chezmoi.roots/_src.posix/private_dot_config/sz.env/091_zsh_9_zinit_fin.env.zsh rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{PATH_zz_cleanup.env => 999_PATH_zz_cleanup.env} (100%) delete mode 100644 chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_0_perp.env.zsh delete mode 100644 chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_3_completion_system.env.zsh rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{executable__.load.sh => executable_000_load.sh} (94%) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{zza_lsd.env => ls_1_lsd.env} (77%) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{zzb_eza.env => ls_2_eza.env} (70%) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{zzz_teleport.env => teleport.env} (100%) create mode 100644 chezmoi.roots/_src.posix/private_dot_config/sz.env/zza_zoxide.env rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{zzy_atuin.env => zzy_atuin.env.bash} (64%) create mode 100644 chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_atuin.env.zsh rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{aliases.env.tmpl => zzz_aliases.env.tmpl} (92%) rename chezmoi.roots/_src.posix/private_dot_config/sz.env/{zzz_bash_post.env => zzz_bash_port.env.bash} (100%) create mode 100644 chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_zsh_finalize.env.zsh diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/PATH_home_bin.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/001_PATH_home_bin.env similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/PATH_home_bin.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/001_PATH_home_bin.env diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/PATH_node.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/001_PATH_node.env similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/PATH_node.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/001_PATH_node.env diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/PATH_truestuff.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/001_PATH_truestuff.env similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/PATH_truestuff.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/001_PATH_truestuff.env diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_000_term.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/002_aaa_term.env similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_000_term.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/002_aaa_term.env diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/099_stop_on_non_interactive_sessions.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/009_stop_on_non_interactive_sessions.env similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/099_stop_on_non_interactive_sessions.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/009_stop_on_non_interactive_sessions.env diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/bbb_ble.sh.env.bash b/chezmoi.roots/_src.posix/private_dot_config/sz.env/011_bash_1_ble.sh.env.bash similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/bbb_ble.sh.env.bash rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/011_bash_1_ble.sh.env.bash diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/bbb_bash_preexec.env.bash b/chezmoi.roots/_src.posix/private_dot_config/sz.env/011_bash_1_preexec.env.bash similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/bbb_bash_preexec.env.bash rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/011_bash_1_preexec.env.bash diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_0_perp.env.zsh b/chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_0_perp.env.zsh new file mode 100644 index 0000000..3e7c8fc --- /dev/null +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_0_perp.env.zsh @@ -0,0 +1,65 @@ +#!/usr/bin/env -S zsh -c 'echo "Not a user script. source(aka .) only"' + +[ -z "$ZSH_CACHE_DIR" ] && export ZSH_CACHE_DIR=$HOME/.cache/zsh +mkdir -p $ZSH_CACHE_DIR/completions +mkdir -p "$HOME/.local/share/zsh/completions" + +# Remove duplicates from fpath, and add local completion dir +fpath=( $( + for d in $( + awk '!seen[$0]++' <( + echo "$HOME/.local/share/zsh/completions" + printf '%s\n' $fpath + ) + ); do + [ -d "$d" ] && echo "$d" + done +) ) + +skip_global_compinit=1 + +# # Jump to the bottom of the screen +# SZ_TPUT_END=$(tput cup 9999 0) +# echo $SZ_TPUT_END + +PS1="$(zsh -c '. <([ -n "$(echo /etc/*-release(N))" ] && cat /etc/*-release(N) | uniq -u || NAME="$VENDOR" ); echo "$NAME $VERSION_ID "')| ZSH ${ZSH_VERSION} LOADING >" + +#"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +#""" Shell Settings """ +#"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +typeset -g HISTFILE="$HOME/.zsh_history" +typeset -g HISTSIZE=1000000 +typeset -g SAVEHIST=$HISTSIZE +typeset -g COMPLETION_WAITING_DOTS="true" +setopt hist_ignore_dups # ignore duplicated commands history list +export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES # fix "+[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called" issue + +##################### +# SETOPT # +##################### +setopt promptsubst +setopt extended_history # record timestamp of command in HISTFILE +setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE +setopt hist_ignore_all_dups # ignore duplicated commands history list +setopt hist_ignore_space # ignore commands that start with space +setopt hist_verify # show command with history expansion to user before running it +setopt inc_append_history # add commands to HISTFILE in order of execution +setopt share_history # share command history data +setopt always_to_end # cursor moved to the end in full completion +setopt hash_list_all # hash everything before completion +setopt nocompletealiases # no complete alisases - no need for specific compdef for aliases +setopt always_to_end # when completing from the middle of a word, move the cursor to the end of the word +setopt complete_in_word # allow completion from within a word/phrase +setopt nocorrect # spelling correction for commands +setopt list_ambiguous # complete as much of a completion until it gets ambiguous. +setopt auto_cd # changing directories without cd +setopt nolisttypes +setopt listpacked +setopt automenu +setopt interactivecomments # allow # comments in command-line +setopt vi + +[[ -n "${DBG}" ]] && echo "ZSH preped" + +# vim: set ft=sh expandtab tabstop=4 shiftwidth=4: + diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_2_zinit.env.zsh b/chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_2_zinit.env.zsh similarity index 86% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_2_zinit.env.zsh rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_2_zinit.env.zsh index a3cca82..b39da75 100644 --- a/chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_2_zinit.env.zsh +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_2_zinit.env.zsh @@ -5,8 +5,11 @@ #"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" # # ### Added by z-shell/zi's installer -ZI_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zi/bin" +ZI_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zi" mkdir -p "$(dirname "$ZI_HOME")" + +typeset -gAH ZINIT=(HOME_DIR "${ZI_HOME}" COMPINIT_OPTS '-D -i -u -C -w') + if [[ ! -d "$ZI_HOME/.git" ]]; then print -P "%F{33}▓▒░ %F{160}Installing (%F{33}z-shell/zi%F{160})…%f" command mkdir -p "$(dirname "$ZINIT_HOME")" \ @@ -17,16 +20,15 @@ if [[ ! -d "$ZI_HOME/.git" ]]; then || print -P "%F{160}▓▒░ The clone has failed.%f%b" fi source "${ZI_HOME}/zi.zsh" -autoload -Uz _zi -(( ${+_comps} )) && _comps[zi]=_zi # examples here -> https://wiki.zshell.dev/ecosystem/category/-annexes zicompinit # <- https://wiki.zshell.dev/docs/guides/commands ### End of z-shell/zi installer's chunk alias zinit=zi -zinit ice depth=1 -zinit light jeffreytse/zsh-vi-mode +autoload -Uz _zi +(( ${+_comps} )) && _comps[zi]=_zi -[[ -n "${DBG}" ]] && echo "zi ready" +[[ -n "${DBG}" ]] && echo "zinit/zi initialized" # vim: set ft=sh expandtab tabstop=4 shiftwidth=4: + diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_3_completion_system.env.zsh b/chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_3_completion_system.env.zsh new file mode 100644 index 0000000..ad813b0 --- /dev/null +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/011_zsh_3_completion_system.env.zsh @@ -0,0 +1,7 @@ +#!/usr/bin/env -S zsh -c 'echo "Not a user script. source(aka .) only"' + +zinit light 'marlonrichert/zsh-autocomplete' +zinit light 'zsh-users/zsh-autosuggestions' + +# vim: set ft=sh expandtab tabstop=4 shiftwidth=4: + diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/aab_zellij.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/021_zellij.env similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/aab_zellij.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/021_zellij.env diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/031_zsh_4_plugin_vimode.env.zsh b/chezmoi.roots/_src.posix/private_dot_config/sz.env/031_zsh_4_plugin_vimode.env.zsh new file mode 100644 index 0000000..54063bb --- /dev/null +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/031_zsh_4_plugin_vimode.env.zsh @@ -0,0 +1,9 @@ +#!/usr/bin/env -S zsh -c 'echo "Not a user script. source(aka .) only"' + +zinit ice depth=1 +zinit light jeffreytse/zsh-vi-mode + +[[ -n "${DBG}" ]] && echo "jeffreytse/zsh-vi-mode loaded" + +# vim: set ft=sh expandtab tabstop=4 shiftwidth=4: +# diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/ccc_load_complete-alias.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/091_load_complete-alias.env similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/ccc_load_complete-alias.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/091_load_complete-alias.env diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/091_zsh_9_zinit_fin.env.zsh b/chezmoi.roots/_src.posix/private_dot_config/sz.env/091_zsh_9_zinit_fin.env.zsh new file mode 100644 index 0000000..b003016 --- /dev/null +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/091_zsh_9_zinit_fin.env.zsh @@ -0,0 +1,10 @@ +#!/usr/bin/env -S zsh -c 'echo "Not a user script. source(aka .) only"' + +autoload -Uz _zi +(( ${+_comps} )) && _comps[zi]=_zi + +autoload -Uz +X compinit bashcompinit && compinit && bashcompinit +[[ -n "${DBG}" ]] && echo "zinit/zi loaded available" + +# vim: set ft=sh expandtab tabstop=4 shiftwidth=4: + diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/PATH_zz_cleanup.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/999_PATH_zz_cleanup.env similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/PATH_zz_cleanup.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/999_PATH_zz_cleanup.env diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_0_perp.env.zsh b/chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_0_perp.env.zsh deleted file mode 100644 index fdeba8c..0000000 --- a/chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_0_perp.env.zsh +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env -S zsh -c 'echo "Not a user script. source(aka .) only"' - -BASE_SHELL=${BASE_SHELL:-${SHELL##*/}} - -if [[ "${BASE_SHELL}" == "zsh" ]]; then - - [ -z "$ZSH_CACHE_DIR" ] && export ZSH_CACHE_DIR=$HOME/.cache/zsh - mkdir -p $ZSH_CACHE_DIR/completions - mkdir -p "$HOME/.local/share/zsh/completions" - - # Remove duplicates from fpath, and add local completion dir - fpath=( $( - for d in $( - awk '!seen[$0]++' <( - echo "$HOME/.local/share/zsh/completions" - printf '%s\n' $fpath - ) - ); do - [ -d "$d" ] && echo "$d" - done - ) ) - - skip_global_compinit=1 - - # # Jump to the bottom of the screen - # SZ_TPUT_END=$(tput cup 9999 0) - # echo $SZ_TPUT_END - - PS1="$(zsh -c '. <([ -n "$(echo /etc/*-release(N))" ] && cat /etc/*-release(N) | uniq -u || NAME="$VENDOR" ); echo "$NAME $VERSION_ID "')| ZSH ${ZSH_VERSION} LOADING >" - - #"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - #""" Shell Settings """ - #"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - typeset -g HISTFILE="$HOME/.zsh_history" - typeset -g HISTSIZE=1000000 - typeset -g SAVEHIST=$HISTSIZE - typeset -g COMPLETION_WAITING_DOTS="true" - setopt hist_ignore_dups # ignore duplicated commands history list - export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES # fix "+[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called" issue - - ##################### - # SETOPT # - ##################### - setopt promptsubst - setopt extended_history # record timestamp of command in HISTFILE - setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE - setopt hist_ignore_all_dups # ignore duplicated commands history list - setopt hist_ignore_space # ignore commands that start with space - setopt hist_verify # show command with history expansion to user before running it - setopt inc_append_history # add commands to HISTFILE in order of execution - setopt share_history # share command history data - setopt always_to_end # cursor moved to the end in full completion - setopt hash_list_all # hash everything before completion - setopt nocompletealiases # no complete alisases - no need for specific compdef for aliases - setopt always_to_end # when completing from the middle of a word, move the cursor to the end of the word - setopt complete_in_word # allow completion from within a word/phrase - setopt nocorrect # spelling correction for commands - setopt list_ambiguous # complete as much of a completion until it gets ambiguous. - setopt auto_cd # changing directories without cd - setopt nolisttypes - setopt listpacked - setopt automenu - setopt interactivecomments # allow # comments in command-line - setopt vi - - [[ -n "${DBG}" ]] && echo "ZSH preped" -fi - -# vim: set ft=sh expandtab tabstop=4 shiftwidth=4: diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_3_completion_system.env.zsh b/chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_3_completion_system.env.zsh deleted file mode 100644 index aeb74e6..0000000 --- a/chezmoi.roots/_src.posix/private_dot_config/sz.env/aaa_zsh_3_completion_system.env.zsh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env -S zsh -c 'echo "Not a user script. source(aka .) only"' - -zinit load 'marlonrichert/zsh-autocomplete' -if false; then - autoload -Uz +X compinit bashcompinit && compinit && bashcompinit - - zstyle ':completion:*' menu yes select -fi - -# vim: set ft=sh expandtab tabstop=4 shiftwidth=4: diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/broot.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/broot.env index bcace4c..f6db53a 100644 --- a/chezmoi.roots/_src.posix/private_dot_config/sz.env/broot.env +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/broot.env @@ -1,7 +1,8 @@ #!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' if is_cmd broot; then - source /mnt/szmedia/USERDATA/home/sz/.config/broot/launcher/bash/br + . <(broot --print-shell-function "${SHELL##*/}") + broot --set-install-state installed fi # vim: set ft=sh expandtab tabstop=4 shiftwidth=4: diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/executable__.load.sh b/chezmoi.roots/_src.posix/private_dot_config/sz.env/executable_000_load.sh similarity index 94% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/executable__.load.sh rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/executable_000_load.sh index a2618dd..c2f059c 100644 --- a/chezmoi.roots/_src.posix/private_dot_config/sz.env/executable__.load.sh +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/executable_000_load.sh @@ -54,15 +54,15 @@ if is_sourced; then "| sort' shell '{}' ';'" \ "-exec sh -c '" \ 'find "$1" -xdev -maxdepth 1 -type f' \ - '-name "PATH_*.env" -or -name "PATH_*.env.'"${BASE_SHELL}"\" \ + '-name "???_PATH_*.env" -or -name "???_PATH_*.env.'"${BASE_SHELL}"\" \ "| sort' shell '{}' ';'" \ "-exec sh -c '" \ 'find "$1" -xdev -maxdepth 1 -type f' \ '-name "*.env" -or -name "*.env.'"${BASE_SHELL}"\" \ - '| grep -Ev "/(PATH|ID)_[^/]+$"' \ + '| grep -Ev "/[[:digit:]]+_(PATH|ID)_[^/]+$"' \ "| sort' shell '{}' ';'" \ "-exec sh -c '" \ - 'find "$1" -xdev -maxdepth 1 -type f -name "PATH_zz_cleanup.env"' \ + 'find "$1" -xdev -maxdepth 1 -type f -name "999_PATH_zz_cleanup.env"' \ "' shell '{}' ';'" )" ALL_ENV_FILES="$( diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zza_lsd.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/ls_1_lsd.env similarity index 77% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/zza_lsd.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/ls_1_lsd.env index 27defa3..28eafbf 100644 --- a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zza_lsd.env +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/ls_1_lsd.env @@ -2,11 +2,11 @@ if is_cmd lsd; then - alias _ls="$(command -v lsd) " - alias lg="ll --git " + alias _ls="$(command -v lsd) --git " [[ -n "${DBG}" ]] && echo "assigned lsd as ls alias." fi # vim: set ft=sh expandtab tabstop=4 shiftwidth=4: + diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzb_eza.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/ls_2_eza.env similarity index 70% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/zzb_eza.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/ls_2_eza.env index a810ea1..e79dc01 100644 --- a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzb_eza.env +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/ls_2_eza.env @@ -2,11 +2,11 @@ if is_cmd eza; then - alias _ls="$(command -v eza) --icons " - alias lg="ll --git --git-repos-no-status" + alias _ls="$(command -v eza) --icons --git --git-repos-no-status " [[ -n "${DBG}" ]] && echo "assigned eza as ls alias." fi # vim: set ft=sh expandtab tabstop=4 shiftwidth=4: + diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_teleport.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/teleport.env similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_teleport.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/teleport.env diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zza_zoxide.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zza_zoxide.env new file mode 100644 index 0000000..d6173cc --- /dev/null +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zza_zoxide.env @@ -0,0 +1,12 @@ +#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' + +if is_cmd zoxide; then + + . <( zoxide init --cmd cd "${BASE_SHELL}" ) + + [[ -n "${DBG}" ]] && echo "zoxide loaded." + +fi + +# vim: set ft=sh expandtab tabstop=4 shiftwidth=4: + diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_atuin.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_atuin.env.bash similarity index 64% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_atuin.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_atuin.env.bash index d3cd71c..bee0244 100644 --- a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_atuin.env +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_atuin.env.bash @@ -1,17 +1,15 @@ #!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' -BASE_SHELL=${BASE_SHELL:-${SHELL##*/}} - if is_cmd atuin; then - if [[ "${BASE_SHELL}" == "bash" ]] && ! [[ -n "$SZ_ENV_BASH_LOAD_PREEXEC$BLE_VERSION" ]]; then + if ! [[ -n "$SZ_ENV_BASH_LOAD_PREEXEC$BLE_VERSION" ]]; then printf '%s\n' \ 'atuin was found, but bash-preexec or ble.sh are not loaded,' \ 'to load atuin, first run update-ble.sh or update-bash-preexec ' \ 'then relaod (_r) the shell.' fi - . <( atuin init "${BASE_SHELL}" ) - . <( atuin gen-completions --shell ${BASE_SHELL} ) + . <( atuin init bash ) + . <( atuin gen-completions --shell bash ) [[ -n "${DBG}" ]] && echo "atuin loaded." fi diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_atuin.env.zsh b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_atuin.env.zsh new file mode 100644 index 0000000..9d06c88 --- /dev/null +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_atuin.env.zsh @@ -0,0 +1,11 @@ +#!/usr/bin/env -S zsh -c 'echo "Not a user script. source(aka .) only"' + +if is_cmd atuin; then + + # . <( atuin init "${BASE_SHELL}" ) + zinit light atuinsh/atuin + + [[ -n "${DBG}" ]] && echo "atuin loaded." +fi + +# vim: set ft=sh expandtab tabstop=4 shiftwidth=4: diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_chezmoi.env.tmpl b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_chezmoi.env.tmpl index f8bdcac..d97634b 100644 --- a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_chezmoi.env.tmpl +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzy_chezmoi.env.tmpl @@ -40,6 +40,7 @@ if is_cmd 'chezmoi'; then chezmoi edit "${EDITLIST[@]}" --apply --interactive } alias czx="CZ_EXTR=1 chezmoi " + alias cz-reset-home="(czcd; cd ..; RESET=reset ./symclone.sh _home.macos; RESET=reset ./symclone.sh _home)" fi -# vim: set ft=bash sw=4 sts=4 et: +# vim: set ft=sh sw=4 sts=4 et: diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/aliases.env.tmpl b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_aliases.env.tmpl similarity index 92% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/aliases.env.tmpl rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_aliases.env.tmpl index 8e1978f..ebaa3ff 100644 --- a/chezmoi.roots/_src.posix/private_dot_config/sz.env/aliases.env.tmpl +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_aliases.env.tmpl @@ -1,6 +1,6 @@ #!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' -alias _ls='command ls ' +[[ "$(command -v _ls)" =~ alias ]] || alias _ls='command ls ' {{- if eq .chezmoi.os "darwin" }} alias ls='_ls -hF --color=auto ' alias l='ls -la ' @@ -36,3 +36,4 @@ alias nvimdiff='nvim -d ' alias vimdiff='nvimdiff ' # vim: set ft=sh expandtab tabstop=4 shiftwidth=4: + diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_bash_post.env b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_bash_port.env.bash similarity index 100% rename from chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_bash_post.env rename to chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_bash_port.env.bash diff --git a/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_zsh_finalize.env.zsh b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_zsh_finalize.env.zsh new file mode 100644 index 0000000..1d7c69e --- /dev/null +++ b/chezmoi.roots/_src.posix/private_dot_config/sz.env/zzz_zsh_finalize.env.zsh @@ -0,0 +1,6 @@ +#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' + +zicompinit + +# vim: set ft=sh expandtab tabstop=4 shiftwidth=4: +