From 64bfc7f4f9208853bfdc3345861c12584d82e435 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Mon, 10 Nov 2025 08:14:41 -0600 Subject: Remove obsolete Zsh configuration and add EditorConfig for consistent coding style Signed-off-by: Matt Strapp --- .editorconfig | 12 +++++ dot_config/zsh/dot_zshopts | 80 +++++++++++++++++++++++++++++++++ dot_config/zsh/executable_dot_zshopts | 83 ----------------------------------- dot_local/bin/executable_update | 5 ++- 4 files changed, 95 insertions(+), 85 deletions(-) create mode 100644 .editorconfig create mode 100644 dot_config/zsh/dot_zshopts delete mode 100644 dot_config/zsh/executable_dot_zshopts diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ebe51d3 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = false +insert_final_newline = false \ No newline at end of file diff --git a/dot_config/zsh/dot_zshopts b/dot_config/zsh/dot_zshopts new file mode 100644 index 0000000..d8db626 --- /dev/null +++ b/dot_config/zsh/dot_zshopts @@ -0,0 +1,80 @@ +#! /usr/bin/env zsh + +# create hist directory if it doesn't exist +if [ -z "$XDG_STATE_HOME/zsh" ]; then + mkdir -p "$XDG_STATE_HOME/zsh" +fi + +# History settings +HISTSIZE=9999999999 +SAVEHIST=$HISTSIZE +HISTFILE="$XDG_STATE_HOME"/zsh/history + +setopt append_history # append the history +setopt inc_append_history # append to history in the current + # session and not just when the session ends +setopt share_history # share history between sessions +setopt extended_history # include statistics of when/how long/etc a + # command has run +setopt hist_ignore_dups # do not store dupes executed after eachother +setopt hist_ignore_all_dups # removes copies of the same line +setopt hist_expire_dups_first # removes copies when the histfile fills up +setopt hist_save_no_dups # don't save dupes from the same session +setopt hist_find_no_dups # if we find dupes in the history, don't show + # them in editor commands) +setopt hist_reduce_blanks # remove blank lines from the command which + # mean nothing to the shell + +setopt HIST_VERIFY # Don't execute immediately upon history expansion. +setopt BANG_HIST # Treat the '!' character specially during expansion. + +setopt complete_aliases # complete aliases +setopt complete_in_word # complete in the middle of a word + +setopt hist_reduce_blanks + +setopt hist_ignore_space # lines starting with space don't go into the + # history +setopt no_hist_beep # silence..! +setopt hist_verify +setopt hist_no_store # don't store history/fc commands +#setopt hist_no_functions # don't show history of function definitions + +setopt bg_nice # nice bg commands +setopt notify # notify when a command returns exit code + +setopt no_beep # silence..! + +setopt auto_cd # cd to a directory if it's the only argument +setopt extendedglob # ls ^bla.* will not show ^bla.txt for example + +setopt correct # correct incorrent cmd's +setopt correctall # correct everything, use + # `nocorrect mv foo bar` to negate this feature + # for a command + +setopt hash_list_all # fill the lookup table for tab completions + +unsetopt promptcr # prevent the prompt overwriting output when + # there is no newline + +unsetopt nomatch # +setopt prompt_subst # Enable prompt substition + +setopt glob_subst # global substitution +setopt globdots # Also look for . files + +setopt longlistjobs +setopt completeinword + +# Directories +setopt auto_pushd # cd foo == pushd foo +setopt pushd_ignore_dups # no duplicates in the list +setopt pushdminus +setopt auto_name_dirs # foo=/path/to/foo is the same as + # hash -d foo=/path/to/foo + +# Misc +setopt interactive_comments # $ # foo doesn't become an error when hitting + # enter + diff --git a/dot_config/zsh/executable_dot_zshopts b/dot_config/zsh/executable_dot_zshopts deleted file mode 100644 index cc26e74..0000000 --- a/dot_config/zsh/executable_dot_zshopts +++ /dev/null @@ -1,83 +0,0 @@ -#! /usr/bin/env zsh - -# If you don't plan on reverting to bash, you can remove the link in ~/.profile -# to clean up. - -# create hist directory if it doesn't exist -if [ -z "$XDG_STATE_HOME/zsh" ]; then - mkdir -p "$XDG_STATE_HOME/zsh" -fi - -# History settings -HISTSIZE=9999999999 -SAVEHIST=$HISTSIZE -HISTFILE="$XDG_STATE_HOME"/zsh/history - -setopt append_history # append the history -setopt inc_append_history # append to history in the current - # session and not just when the session ends -setopt share_history # share history between sessions -setopt extended_history # include statistics of when/how long/etc a - # command has run -setopt hist_ignore_dups # do not store dupes executed after eachother -setopt hist_ignore_all_dups # removes copies of the same line -setopt hist_expire_dups_first # removes copies when the histfile fills up -setopt hist_save_no_dups # don't save dupes from the same session -setopt hist_find_no_dups # if we find dupes in the history, don't show - # them in editor commands) -setopt hist_reduce_blanks # remove blank lines from the command which - # mean nothing to the shell - -setopt HIST_VERIFY # Don't execute immediately upon history expansion. -setopt BANG_HIST # Treat the '!' character specially during expansion. - -setopt complete_aliases # complete aliases -setopt complete_in_word # complete in the middle of a word - -setopt hist_reduce_blanks - -setopt hist_ignore_space # lines starting with space don't go into the - # history -setopt no_hist_beep # silence..! -setopt hist_verify -setopt hist_no_store # don't store history/fc commands -#setopt hist_no_functions # don't show history of function definitions - -setopt bg_nice # nice bg commands -setopt notify # notify when a command returns exit code - -setopt no_beep # silence..! - -setopt auto_cd # cd to a directory if it's the only argument -setopt extendedglob # ls ^bla.* will not show ^bla.txt for example - -setopt correct # correct incorrent cmd's -setopt correctall # correct everything, use - # `nocorrect mv foo bar` to negate this feature - # for a command - -setopt hash_list_all # fill the lookup table for tab completions - -unsetopt promptcr # prevent the prompt overwriting output when - # there is no newline - -unsetopt nomatch # -setopt prompt_subst # Enable prompt substition - -setopt glob_subst # global substitution -setopt globdots # Also look for . files - -setopt longlistjobs -setopt completeinword - -# Directories -setopt auto_pushd # cd foo == pushd foo -setopt pushd_ignore_dups # no duplicates in the list -setopt pushdminus -setopt auto_name_dirs # foo=/path/to/foo is the same as - # hash -d foo=/path/to/foo - -# Misc -setopt interactive_comments # $ # foo doesn't become an error when hitting - # enter - diff --git a/dot_local/bin/executable_update b/dot_local/bin/executable_update index 1c36665..20b7260 100644 --- a/dot_local/bin/executable_update +++ b/dot_local/bin/executable_update @@ -21,7 +21,8 @@ fi UPDATED=0 -set -- "$ID" "$ID_LIKE" +# shellcheck disable=SC2086 +set -- $ID $ID_LIKE for i in "$@"; do case "$i" in # YUNO use ID_LIKE, chimera :( @@ -61,7 +62,7 @@ for i in "$@"; do sudo emerge -av --depclean || return 1 UPDATED=1 ;; - opensuse) + suse) sudo zypper refresh || return 1 sudo zypper update || return 1 sudo zypper clean -a || return 1 -- cgit v1.2.3