From 55ee70dbd6569e7d10120bbc3abd95f806fcac1d Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 4 Dec 2023 14:36:32 +0100 Subject: [PATCH] fix: typos --- bin/automount.sh | 2 +- bin/converter.sh | 10 +- bin/fsend.py | 2 +- bin/get_nvim.sh | 4 +- bin/get_shell.sh | 2 +- bin/grp.sh | 2 +- bin/oscclip.sh | 2 +- config/wezterm/functions.lua | 1 - config/wezterm/patch_runtime.lua | 2 +- git/bin/git-co | 15 +- git/bin/git-dev | 15 +- git/bin/git-ignore | 2 +- git/bin/git-pla | 15 +- git/bin/git-review | 330 ------------------------------- git/bin/git-user | 15 +- git/bin/git-wt | 25 +-- install.sh | 90 ++++----- shell/alias/alias.sh | 4 +- shell/init/shellrc.csh | 2 +- shell/init/shellrc.sh | 2 +- shell/settings/bash.sh | 4 +- shell/settings/zsh.sh | 2 +- shell/zfunctions/_venv | 2 +- test/lint.sh | 2 +- 24 files changed, 90 insertions(+), 462 deletions(-) delete mode 100755 git/bin/git-review diff --git a/bin/automount.sh b/bin/automount.sh index 80554aa..ec4547e 100755 --- a/bin/automount.sh +++ b/bin/automount.sh @@ -147,7 +147,7 @@ Usage: $NAME [OPTIONAL] Optional Flags - --nolog Disable log writting + --nolog Disable log writing --nocolor Disable color output -v, --verbose Enable debug messages -h, --help Display this help message diff --git a/bin/converter.sh b/bin/converter.sh index d6c70c4..b55d533 100755 --- a/bin/converter.sh +++ b/bin/converter.sh @@ -159,13 +159,13 @@ reset_color="\033[39m" function help_user() { cat </dev/null; then @@ -627,7 +627,7 @@ function clean_up() { verbose_msg "Using media path at ${MEDIA_PATH}" verbose_msg "Using archive path at ${ARCHIVE}" -start_convertion +start_conversion if [[ $ERR_COUNT -gt 0 ]]; then exit 1 diff --git a/bin/fsend.py b/bin/fsend.py index d5b45f9..e604b63 100755 --- a/bin/fsend.py +++ b/bin/fsend.py @@ -59,7 +59,7 @@ def _createLogger( filename: str = "dummy.log", name: str = "MainLogger", ): - """Creaters logging obj + """Creators logging obj stdout_level: int: logging level displayed into the terminal file_level: int: logging level saved into the logging file diff --git a/bin/get_nvim.sh b/bin/get_nvim.sh index 423273a..6d563ca 100755 --- a/bin/get_nvim.sh +++ b/bin/get_nvim.sh @@ -165,7 +165,7 @@ Usage: Just few systems are supported, Debian's family, Fedora's family and ArchLinux's family - --dev Use developement builds/portables instead of stable + --dev Use development builds/portables instead of stable --stable Use stable builds/portables instead of stable @@ -574,7 +574,7 @@ fi status_msg "Building neovim" verbose_msg "Building $BUILD_TYPE on $BRANCH" -if make CMAKE_BUILD_TYPE="$BUILD_TYPE"; then +if make CMAKE_BUILD_TYPE="$BUILD_TYPE" -j; then INSTALL_DIR="${INSTALL_DIR:-$HOME/.local}" status_msg "Installing neovim into $INSTALL_DIR" if ! make CMAKE_BUILD_TYPE="$BUILD_TYPE" CMAKE_INSTALL_PREFIX="$INSTALL_DIR" install; then diff --git a/bin/get_shell.sh b/bin/get_shell.sh index ff481b4..321159b 100755 --- a/bin/get_shell.sh +++ b/bin/get_shell.sh @@ -91,7 +91,7 @@ Usage: -f, --force Force installation, remove all previous conflict files before installing This flag is always disable by default -s, --shell Force a shell install. Available: bash/bash-it and zsh/oh-my-zsh - --nolog Disable log writting + --nolog Disable log writing --nocolor Disable color output -v, --verbose Enable debug messages -h, --help Display this help message diff --git a/bin/grp.sh b/bin/grp.sh index e43591d..3c0e002 100755 --- a/bin/grp.sh +++ b/bin/grp.sh @@ -189,7 +189,7 @@ else error_msg "The given path doesn't exist" fi - # Retrun to the original dir + # Return to the original dir popd 1>/dev/null || exit 1 else diff --git a/bin/oscclip.sh b/bin/oscclip.sh index 0121650..eff4997 100755 --- a/bin/oscclip.sh +++ b/bin/oscclip.sh @@ -194,7 +194,7 @@ Usage: -h, --help Display help, if you are seeing this, that means that you already know it (nice) -v, --verbose Enable debug messages - --nolog Disable log writting + --nolog Disable log writing --nocolor Disable color output -i [TEXT] Add TEXT to the clipboard using OSC52 - Read from the stdin and copy the content to the clipboard diff --git a/config/wezterm/functions.lua b/config/wezterm/functions.lua index 00a0476..b4156d8 100644 --- a/config/wezterm/functions.lua +++ b/config/wezterm/functions.lua @@ -8,7 +8,6 @@ end function M.get_active_window() local windows = wezterm.gui.gui_windows() - local win for _, win in ipairs(windows) do if win:is_focused() then return win diff --git a/config/wezterm/patch_runtime.lua b/config/wezterm/patch_runtime.lua index 0735180..79c893a 100644 --- a/config/wezterm/patch_runtime.lua +++ b/config/wezterm/patch_runtime.lua @@ -32,7 +32,7 @@ else neovim_path = sys.home .. '/.config/nvim/lua/' end --- TODO: Find version "dinamically" +-- TODO: Find version "dynamically" for _, complement in ipairs { 'lib', 'share' } do for _, base in ipairs(bases) do table.insert(paths, ('%s/%s/%s'):format(base, complement, 'lua/5.4/')) diff --git a/git/bin/git-co b/git/bin/git-co index 769ec99..52d8a5f 100755 --- a/git/bin/git-co +++ b/git/bin/git-co @@ -191,17 +191,10 @@ Usage: Optional Flags - --nolog - Disable log writting - - --nocolor - Disable color output - - -v, --verbose - Enable debug messages - - -h, --help - Display help, if you are seeing this, that means that you already know it (nice) + --nolog Disable log writing + --nocolor Disable color output + -v, --verbose Enable debug messages + -h, --help Display help, if you are seeing this, that means that you already know it (nice) EOF } diff --git a/git/bin/git-dev b/git/bin/git-dev index 8ef7e1d..3b3a6f2 100755 --- a/git/bin/git-dev +++ b/git/bin/git-dev @@ -146,17 +146,10 @@ Usage: Optional Flags - --nolog - Disable log writting - - --nocolor - Disable color output - - -v, --verbose - Enable debug messages - - -h, --help - Display help, if you are seeing this, that means that you already know it (nice) + --nolog Disable log writing + --nocolor Disable color output + -v, --verbose Enable debug messages + -h, --help Display help, if you are seeing this, that means that you already know it (nice) EOF } diff --git a/git/bin/git-ignore b/git/bin/git-ignore index 6bb260f..bf81985 100755 --- a/git/bin/git-ignore +++ b/git/bin/git-ignore @@ -26,7 +26,7 @@ # Create useful gitignore files # Usage: gi [param] # param is a comma separated list of ignore profiles. -# If param is ommited choose interactively. +# If param is omitted choose interactively. function help_user() { cat </dev/null; then - SCRIPT_PATH=$(realpath "$SCRIPT_PATH") -else - pushd "$SCRIPT_PATH" 1>/dev/null || exit 1 - SCRIPT_PATH="$(pwd -P)" - popd 1>/dev/null || exit 1 -fi - -if [[ -n $ZSH_NAME ]]; then - CURRENT_SHELL="zsh" -elif [[ -n $BASH ]]; then - CURRENT_SHELL="bash" -else - # shellcheck disable=SC2009,SC2046 - if [[ -z $CURRENT_SHELL ]]; then - CURRENT_SHELL="${SHELL##*/}" - fi -fi - -if [ -z "$SHELL_PLATFORM" ]; then - if [[ -n $TRAVIS_OS_NAME ]]; then - export SHELL_PLATFORM="$TRAVIS_OS_NAME" - else - case "$OSTYPE" in - *'linux'*) export SHELL_PLATFORM='linux' ;; - *'darwin'*) export SHELL_PLATFORM='osx' ;; - *'freebsd'*) export SHELL_PLATFORM='bsd' ;; - *'cygwin'*) export SHELL_PLATFORM='cygwin' ;; - *'msys'*) export SHELL_PLATFORM='msys' ;; - *'windows'*) export SHELL_PLATFORM='windows' ;; - *) export SHELL_PLATFORM='unknown' ;; - esac - fi -fi - -case "$SHELL_PLATFORM" in - # TODO: support more linux distros - linux) - if [[ -f /etc/arch-release ]]; then - OS='arch' - elif [[ "$(cat /etc/issue)" == Ubuntu* ]]; then - OS='ubuntu' - elif [[ -f /etc/debian_version ]] || [[ "$(cat /etc/issue)" == Debian* ]]; then - if [[ $ARCH == *\ armv7* ]]; then # Raspberry pi 3 uses armv7 cpu - OS='raspbian' - else - OS='debian' - fi - fi - ;; - cygwin | msys | windows) - OS='windows' - ;; - osx) - OS='macos' - ;; - bsd) - OS='bsd' - ;; -esac - -if ! hash is_osx >/dev/null; then - function is_osx() { - if [[ $SHELL_PLATFORM == 'osx' ]]; then - return 0 - fi - return 1 - } -fi - -# colors -# shellcheck disable=SC2034 -black="\033[0;30m" -# shellcheck disable=SC2034 -red="\033[0;31m" -# shellcheck disable=SC2034 -green="\033[0;32m" -# shellcheck disable=SC2034 -yellow="\033[0;33m" -# shellcheck disable=SC2034 -blue="\033[0;34m" -# shellcheck disable=SC2034 -purple="\033[0;35m" -# shellcheck disable=SC2034 -cyan="\033[0;36m" -# shellcheck disable=SC2034 -white="\033[0;37;1m" -# shellcheck disable=SC2034 -orange="\033[0;91m" -# shellcheck disable=SC2034 -normal="\033[0m" -# shellcheck disable=SC2034 -reset_color="\033[39m" - -function help_user() { - cat <>"${LOG}" - fi - return 0 -} - -function error_msg() { - local error_message="$1" - if [[ $NOCOLOR -eq 0 ]]; then - printf "${red}[X] Error:${reset_color}\t %s\n" "$error_message" 1>&2 - else - printf "[X] Error:\t %s\n" "$error_message" 1>&2 - fi - ERR_COUNT=$((ERR_COUNT + 1)) - if [[ $NOLOG -eq 0 ]]; then - printf "[X] Error:\t %s\n" "$error_message" >>"${LOG}" - fi - return 0 -} - -function status_msg() { - local status_message="$1" - if [[ $NOCOLOR -eq 0 ]]; then - printf "${green}[*] Info:${reset_color}\t %s\n" "$status_message" - else - printf "[*] Info:\t %s\n" "$status_message" - fi - if [[ $NOLOG -eq 0 ]]; then - printf "[*] Info:\t\t %s\n" "$status_message" >>"${LOG}" - fi - return 0 -} - -function verbose_msg() { - local debug_message="$1" - if [[ $VERBOSE -eq 1 ]]; then - if [[ $NOCOLOR -eq 0 ]]; then - printf "${purple}[+] Debug:${reset_color}\t %s\n" "$debug_message" - else - printf "[+] Debug:\t %s\n" "$debug_message" - fi - fi - if [[ $NOLOG -eq 0 ]]; then - printf "[+] Debug:\t\t %s\n" "$debug_message" >>"${LOG}" - fi - return 0 -} - -function __parse_args() { - if [[ $# -lt 2 ]]; then - error_msg "Internal error in __parse_args function trying to parse $1" - exit 1 - fi - - local flag="$2" - local value="$1" - - local pattern="^--${flag}=[a-zA-Z0-9.:@_/~-]+$" - - if [[ -n $3 ]]; then - local pattern="^--${flag}=$3$" - fi - - if [[ $value =~ $pattern ]]; then - local left_side="${value#*=}" - echo "${left_side/#\~/$HOME}" - else - echo "$value" - fi -} - -function initlog() { - if [[ $NOLOG -eq 0 ]]; then - [[ -n $LOG ]] && rm -f "${LOG}" 2>/dev/null - if ! touch "${LOG}" &>/dev/null; then - error_msg "Fail to init log file" - NOLOG=1 - return 1 - fi - if [[ -f "${SCRIPT_PATH}/shell/banner" ]]; then - cat "${SCRIPT_PATH}/shell/banner" >"${LOG}" - fi - if ! is_osx; then - LOG=$(readlink -e "${LOG}") - fi - verbose_msg "Using log at ${LOG}" - fi - return 0 -} - -function exit_append() { - if [[ $NOLOG -eq 0 ]]; then - if [[ $WARN_COUNT -gt 0 ]] || [[ $ERR_COUNT -gt 0 ]]; then - printf "\n\n" >>"${LOG}" - fi - - if [[ $WARN_COUNT -gt 0 ]]; then - printf "[*] Warnings:\t%s\n" "$WARN_COUNT" >>"${LOG}" - fi - if [[ $ERR_COUNT -gt 0 ]]; then - printf "[*] Errors:\t%s\n" "$ERR_COUNT" >>"${LOG}" - fi - fi - return 0 -} - -while [[ $# -gt 0 ]]; do - key="$1" - case "$key" in - --nolog) - NOLOG=1 - ;; - --nocolor) - NOCOLOR=1 - ;; - -v | --verbose) - VERBOSE=1 - ;; - -h | --help) - help_user - exit 0 - ;; - # -) - # while read -r from_stdin; do - # FROM_STDIN=("$from_stdin") - # done - # break - # ;; - *) - initlog - error_msg "Unknown argument $key" - help_user - exit 1 - ;; - esac - shift -done - -initlog -verbose_msg "Log Disable : ${NOLOG}" -verbose_msg "Current Shell : ${CURRENT_SHELL}" -verbose_msg "Platform : ${SHELL_PLATFORM}" -verbose_msg "Architecture : ${ARCH}" -verbose_msg "OS : ${OS}" - -####################################################################### -# CODE Goes Here # -####################################################################### - -BRANCH="$(git symbolic-ref --short HEAD 2>/dev/null)" - -if [[ $BRANCH =~ ^dev/$USER/[a-zA-Z_0-9]+$ ]]; then - git push --set-upstream origin "$BRANCH" -else - error_msg "Not valid named branch: $BRANCH" -fi - -if [[ $ERR_COUNT -gt 0 ]]; then - exit 1 -fi - -exit 0 diff --git a/git/bin/git-user b/git/bin/git-user index 8191be3..0e7556e 100755 --- a/git/bin/git-user +++ b/git/bin/git-user @@ -148,17 +148,10 @@ Usage: Optional Flags - --nolog - Disable log writting - - --nocolor - Disable color output - - -v, --verbose - Enable debug messages - - -h, --help - Display help, if you are seeing this, that means that you already know it (nice) + --nolog Disable log writing + --nocolor Disable color output + -v, --verbose Enable debug messages + -h, --help Display help, if you are seeing this, that means that you already know it (nice) EOF } diff --git a/git/bin/git-wt b/git/bin/git-wt index 869c182..95abe7c 100755 --- a/git/bin/git-wt +++ b/git/bin/git-wt @@ -193,23 +193,12 @@ Usage: Optional Flags - --nolog - Disable log writting - - --nocolor - Disable color output - - -r, --remove - Remove the selected worktree - - -l, --list - List all available worktrees - - -v, --verbose - Enable debug messages - - -h, --help - Display help, if you are seeing this, that means that you already know it (nice) + --nolog Disable log writing + --nocolor Disable color output + -r, --remove Remove the selected worktree + -l, --list List all available worktrees + -v, --verbose Enable debug messages + -h, --help Display help, if you are seeing this, that means that you already know it (nice) EOF } @@ -447,6 +436,8 @@ else ".projections.json" ".pre-commit-config.yaml" "pyproject.toml" + "reviewers.json" + "typos.toml" ) status_msg "Copying project files" diff --git a/install.sh b/install.sh index b55407a..3396a68 100755 --- a/install.sh +++ b/install.sh @@ -25,7 +25,7 @@ # .` github.com/mike325/dotfiles `/ # TODO: create a install.ps1 to install -# - scoop and aditional buckets versions, extras and nerd-fonts +# - scoop and additional buckets versions, extras and nerd-fonts # - chocolatey ALL=1 @@ -267,7 +267,7 @@ Usage: Default: https --url - Provie full git url (ex. https://gitlab.com/mike325), the new base user must have + Provide full git url (ex. https://gitlab.com/mike325), the new base user must have the following repos - .vim - .emacs.d @@ -408,7 +408,7 @@ Usage: Default: on --nolog - Disable log writting + Disable log writing Default: off @@ -547,14 +547,14 @@ function exit_append() { function clean_up() { verbose_msg "Cleaning up by interrupt" - verbose_msg "Cleanning up rg ${TMP}/rg.*" && rm -rf "${TMP}/rg.*" 2>/dev/null - verbose_msg "Cleanning up rg $TMP/ripgrep-*" && rm -rf "$TMP/ripgrep-*" 2>/dev/null - verbose_msg "Cleanning up fd ${TMP}/fd.*" && rm -rf "${TMP}/fd.*" 2>/dev/null - verbose_msg "Cleanning up fd $TMP/fd-*" && rm -rf "$TMP/fd-*" 2>/dev/null - verbose_msg "Cleanning up pip $TMP/get-pip.py" && rm -rf "$TMP/get-pip.py" 2>/dev/null - verbose_msg "Cleanning up shellcheck $TMP/shellcheck*" && rm -rf "$TMP/shellcheck*" 2>/dev/null - verbose_msg "Cleanning up ctags $TMP/ctags*" && rm -rf "$TMP/ctags*" 2>/dev/null - verbose_msg "Cleanning up nvim $TMP/nvim" && rm -rf "$TMP/nvim" 2>/dev/null + verbose_msg "Cleaning up rg ${TMP}/rg.*" && rm -rf "${TMP}/rg.*" 2>/dev/null + verbose_msg "Cleaning up rg $TMP/ripgrep-*" && rm -rf "$TMP/ripgrep-*" 2>/dev/null + verbose_msg "Cleaning up fd ${TMP}/fd.*" && rm -rf "${TMP}/fd.*" 2>/dev/null + verbose_msg "Cleaning up fd $TMP/fd-*" && rm -rf "$TMP/fd-*" 2>/dev/null + verbose_msg "Cleaning up pip $TMP/get-pip.py" && rm -rf "$TMP/get-pip.py" 2>/dev/null + verbose_msg "Cleaning up shellcheck $TMP/shellcheck*" && rm -rf "$TMP/shellcheck*" 2>/dev/null + verbose_msg "Cleaning up ctags $TMP/ctags*" && rm -rf "$TMP/ctags*" 2>/dev/null + verbose_msg "Cleaning up nvim $TMP/nvim" && rm -rf "$TMP/nvim" 2>/dev/null exit_append exit 1 } @@ -730,7 +730,6 @@ function setup_bin() { local scriptname="${script##*/}" local file_basename="${scriptname%%.*}" - # local file_extention="${scriptname##*.}" verbose_msg "Setup $script into $HOME/.local/bin/$file_basename" setup_config "$script" "$HOME/.local/bin/$file_basename" @@ -751,7 +750,6 @@ function setup_dotconfigs() { local scriptname="${script##*/}" # local file_basename="${scriptname%%.*}" - # local file_extention="${scriptname##*.}" verbose_msg "Setup $script into $HOME/.${scriptname}" setup_config "$script" "$HOME/.${scriptname}" @@ -925,7 +923,6 @@ function setup_git() { local scriptname="${script##*/}" local file_basename="${scriptname%%.*}" - # local file_extention="${scriptname##*.}" verbose_msg "Getting $hooks into ${SCRIPT_PATH}/.git/hooks/${hooks##*/}" @@ -985,7 +982,7 @@ function get_nvim_dotfiles() { [[ $CMD == "ln -s" ]] && status_msg "Linking current vim dotfiles" [[ $CMD == "cp -rf" ]] && status_msg "Copying current vim dotfiles" if ! setup_config "$HOME/.vim" "$HOME/.config/nvim"; then - error_msg "Failed gettings dotvim files" + error_msg "Failed getting dotvim files" return 1 fi else @@ -1019,8 +1016,8 @@ function _windows_portables() { unzip -o "$TMP/${pkg}" -d "$TMP/shellcheck-latest" chmod +x "$TMP/shellcheck-latest/shellcheck.exe" mv "$TMP/shellcheck-latest/shellcheck.exe" "$HOME/.local/bin/shellcheck.exe" - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" - verbose_msg "Cleanning up data $TMP/shellcheck-latest" && rm -rf "$TMP/shellcheck-latest" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up data $TMP/shellcheck-latest" && rm -rf "$TMP/shellcheck-latest" else rst=1 fi @@ -1053,8 +1050,8 @@ function _windows_portables() { chmod u+x "$TMP/bat-${version}-${os_type}/bat-${version}-${os_type}/bat.exe" mv "$TMP/bat-${version}-${os_type}/bat-${version}-${os_type}/bat.exe" "$HOME/.local/bin/" fi - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" - verbose_msg "Cleanning up data $TMP/bat-${version}-${os_type}" && rm -rf "$TMP/bat-${version}-${os_type}/" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up data $TMP/bat-${version}-${os_type}" && rm -rf "$TMP/bat-${version}-${os_type}/" popd 1>/dev/null || return 1 else rst=1 @@ -1088,8 +1085,8 @@ function _windows_portables() { chmod u+x "$TMP/delta-${version}-${os_type}/delta.exe" mv "$TMP/delta-${version}-${os_type}/delta.exe" "$HOME/.local/bin/" fi - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" - verbose_msg "Cleanning up data $TMP/delta-${version}-${os_type}" && rm -rf "$TMP/delta-${version}-${os_type}/" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up data $TMP/delta-${version}-${os_type}" && rm -rf "$TMP/delta-${version}-${os_type}/" popd 1>/dev/null || return 1 else rst=1 @@ -1123,8 +1120,8 @@ function _windows_portables() { chmod u+x "$TMP/ripgrep-${version}-${os_type}/rg.exe" mv "$TMP/ripgrep-${version}-${os_type}/rg.exe" "$HOME/.local/bin/" fi - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" - verbose_msg "Cleanning up data $TMP/ripgrep-${version}-${os_type}" && rm -rf "$TMP/ripgrep-${version}-${os_type}/" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up data $TMP/ripgrep-${version}-${os_type}" && rm -rf "$TMP/ripgrep-${version}-${os_type}/" popd 1>/dev/null || return 1 else rst=1 @@ -1158,8 +1155,8 @@ function _windows_portables() { chmod u+x "$TMP/fd-${version}-${os_type}/fd-${version}-${os_type}/fd.exe" mv "$TMP/fd-${version}-${os_type}/fd-${version}-${os_type}/fd.exe" "$HOME/.local/bin/" fi - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" - verbose_msg "Cleanning up data $TMP/fd-${version}-${os_type}/fd-${version}-${os_type}" && rm -rf "$TMP/fd-${version}-${os_type}/fd-${version}-${os_type}/" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up data $TMP/fd-${version}-${os_type}/fd-${version}-${os_type}" && rm -rf "$TMP/fd-${version}-${os_type}/fd-${version}-${os_type}/" popd 1>/dev/null || return 1 else rst=1 @@ -1189,7 +1186,7 @@ function _windows_portables() { unzip -o "$TMP/${pkg}" chmod u+x "$TMP/texlab.exe" mv "$TMP/texlab.exe" "$HOME/.local/bin/" - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" popd 1>/dev/null || return 1 else rst=1 @@ -1253,7 +1250,7 @@ function _windows_portables() { if unzip -o "$TMP/${pkg}" -d "$TMP/"; then if chmod u+x "$TMP/stylua.exe"; then if ! mv "$TMP/stylua.exe" "$HOME/.local/bin/"; then - error_msg "Faild to move stylua.exe to ~/.local/bin/" + error_msg "Failed to move stylua.exe to ~/.local/bin/" rst=1 fi else @@ -1264,7 +1261,7 @@ function _windows_portables() { error_msg "Failed to extract ${TMP}/${pkg}" rst=1 fi - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" popd 1>/dev/null || return 1 else rst=1 @@ -1342,7 +1339,7 @@ function _linux_portables() { verbose_msg "Extracting into $TMP/${pkg}" && tar xf "$TMP/${pkg}" chmod u+x "$TMP/lazygit" mv "$TMP/lazygit" "$HOME/.local/bin/" - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" popd 1>/dev/null || return 1 else rst=1 @@ -1375,8 +1372,8 @@ function _linux_portables() { verbose_msg "Extracting into $TMP/${pkg}" && tar xf "$TMP/${pkg}" chmod u+x "$TMP/bat-${version}-${os_type}/bat" mv "$TMP/bat-${version}-${os_type}/bat" "$HOME/.local/bin/" - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" - verbose_msg "Cleanning up data $TMP/bat-${version}-${os_type}" && rm -rf "$TMP/bat-${version}-${os_type}/" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up data $TMP/bat-${version}-${os_type}" && rm -rf "$TMP/bat-${version}-${os_type}/" popd 1>/dev/null || return 1 else rst=1 @@ -1409,8 +1406,8 @@ function _linux_portables() { verbose_msg "Extracting into $TMP/${pkg}" && tar xf "$TMP/${pkg}" chmod u+x "$TMP/delta-${version}-${os_type}/delta" mv "$TMP/delta-${version}-${os_type}/delta" "$HOME/.local/bin/" - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" - verbose_msg "Cleanning up data $TMP/delta-${version}-${os_type}" && rm -rf "$TMP/delta-${version}-${os_type}/" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up data $TMP/delta-${version}-${os_type}" && rm -rf "$TMP/delta-${version}-${os_type}/" popd 1>/dev/null || return 1 else rst=1 @@ -1446,8 +1443,8 @@ function _linux_portables() { verbose_msg "Extracting into $TMP/${pkg}" && tar xf "$TMP/${pkg}" chmod u+x "$TMP/ripgrep-${version}-${os_type}/rg" mv "$TMP/ripgrep-${version}-${os_type}/rg" "$HOME/.local/bin/" - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" - verbose_msg "Cleanning up data $TMP/ripgrep-${version}-${os_type}" && rm -rf "$TMP/ripgrep-${version}-${os_type}" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up data $TMP/ripgrep-${version}-${os_type}" && rm -rf "$TMP/ripgrep-${version}-${os_type}" popd 1>/dev/null || return 1 else rst=1 @@ -1480,8 +1477,8 @@ function _linux_portables() { verbose_msg "Extracting into $TMP/${pkg}" && tar xf "$TMP/${pkg}" chmod u+x "$TMP/fd-${version}-${os_type}/fd" mv "$TMP/fd-${version}-${os_type}/fd" "$HOME/.local/bin/" - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" - verbose_msg "Cleanning up data $TMP/fd-${version}-${os_type}" && rm -rf "$TMP/fd-${version}-${os_type}/" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up data $TMP/fd-${version}-${os_type}" && rm -rf "$TMP/fd-${version}-${os_type}/" popd 1>/dev/null || return 1 else rst=1 @@ -1506,8 +1503,8 @@ function _linux_portables() { verbose_msg "Extracting into $TMP/${pkg}" && tar xf "$TMP/${pkg}" chmod u+x "$TMP/shellcheck-latest/shellcheck" mv "$TMP/shellcheck-latest/shellcheck" "$HOME/.local/bin/" - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" - verbose_msg "Cleanning up data $TMP/shellcheck-latest/" && rm -rf "$TMP/shellcheck-latest/" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up data $TMP/shellcheck-latest/" && rm -rf "$TMP/shellcheck-latest/" popd 1>/dev/null || return 1 else rst=1 @@ -1539,7 +1536,7 @@ function _linux_portables() { verbose_msg "Extracting into $TMP/${pkg}" && tar xf "$TMP/${pkg}" chmod u+x "$TMP/texlab" mv "$TMP/texlab" "$HOME/.local/bin/" - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" popd 1>/dev/null || return 1 else rst=1 @@ -1626,7 +1623,7 @@ function _linux_portables() { verbose_msg "Extracting into $TMP/${pkg}" && tar xf "$TMP/${pkg}" chmod u+x "$TMP/gh_${version}_${os_type}/bin/gh" mv "$TMP/gh_${version}_${os_type}/bin/gh" "$HOME/.local/bin/" - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" popd 1>/dev/null || return 1 else rst=1 @@ -1708,7 +1705,7 @@ function _linux_portables() { error_msg "Failed to unzip stylua" rst=1 fi - verbose_msg "Cleanning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" + verbose_msg "Cleaning up pkg ${TMP}/${pkg}" && rm -rf "${TMP:?}/${pkg}" popd 1>/dev/null || return 1 else rst=1 @@ -1803,7 +1800,7 @@ function get_dotfiles() { function get_cool_fonts() { local github='https://github.com' if [[ -z $SSH_CONNECTION ]]; then - status_msg "Gettings powerline fonts" + status_msg "Getting powerline fonts" if clone_repo "${github}/powerline/fonts" "$HOME/.local/fonts"; then if is_windows; then # We could indeed run $ powershell $HOME/.local/fonts/install.ps1 @@ -1844,7 +1841,6 @@ function setup_systemd() { local servicename="${service##*/}" local file_basename="${servicename%%.*}" - # local file_extention="${scriptname##*.}" verbose_msg "Setup $service in $HOME/.config/systemd/user/${servicename}" setup_config "${service}" "$HOME/.config/systemd/user/${servicename}" @@ -2006,7 +2002,7 @@ function setup_pkgs() { filename=$(basename "$pkg") local cmdname="${filename%.pkg}" if ! hash "${cmdname}" 2>/dev/null; then - warn_msg "Skipping pacakges from ${filename}, ${cmdname} is not install or missing in the PATH" + warn_msg "Skipping packages from ${filename}, ${cmdname} is not install or missing in the PATH" continue fi while IFS= read -r line; do @@ -2240,7 +2236,7 @@ while [[ $# -gt 0 ]]; do error_msg "Package file $_result does not exists" exit 1 elif [[ ! $_result =~ \.pkg$ ]]; then - error_msg "$_result is not a valid package file, the file must have .pkg extention" + error_msg "$_result is not a valid package file, the file must have .pkg extension" exit 1 fi PKG_FILE="$_result" @@ -2259,7 +2255,7 @@ while [[ $# -gt 0 ]]; do error_msg "Package file $_result does not exists" exit 1 elif [[ ! $_result =~ \.pkg$ ]] || [[ ! -f "${SCRIPT_PATH}/packages/${OS}/${_result}.pkg" ]]; then - error_msg "$_result is not a valid package file, the file must have .pkg extention" + error_msg "$_result is not a valid package file, the file must have .pkg extension" exit 1 fi PKG_FILE="$_result" diff --git a/shell/alias/alias.sh b/shell/alias/alias.sh index 2245780..b09c2c9 100755 --- a/shell/alias/alias.sh +++ b/shell/alias/alias.sh @@ -28,7 +28,7 @@ if hash nvim 2>/dev/null; then TMUX_WINDOW="$(tmux display-message -p '#I')" export TMUX_WINDOW else - # TODO: Use shell TTY to separete neovim's socket sessions + # TODO: Use shell TTY to separate neovim's socket sessions export TMUX_WINDOW="" fi @@ -804,7 +804,7 @@ function rl() { # Init original path with HOME dir ORIGINAL_PATH="$(pwd)" -# Move to the realpath version of the curren working dir +# Move to the realpath version of the current working dir function crp() { # Save the current path ORIGINAL_PATH="$(pwd)" diff --git a/shell/init/shellrc.csh b/shell/init/shellrc.csh index 0f861ff..4c6354e 100644 --- a/shell/init/shellrc.csh +++ b/shell/init/shellrc.csh @@ -138,7 +138,7 @@ if ($?prompt) then source "$HOME/.config/shell/alias/alias.csh" endif - # # Load host settings (override general alias and funtions) + # # Load host settings (override general alias and functions if ( -f "$HOME/.config/shell/host/settings.csh" ) then source "$HOME/.config/shell/host/settings.csh" endif diff --git a/shell/init/shellrc.sh b/shell/init/shellrc.sh index b00962f..a8733e4 100755 --- a/shell/init/shellrc.sh +++ b/shell/init/shellrc.sh @@ -308,7 +308,7 @@ if [[ $- == *i* ]]; then source "$HOME/.config/shell/alias/alias.sh" fi - # Load host settings (override general alias and funtions) + # Load host settings (override general alias and functions) if [[ -f "$HOME/.config/shell/host/settings.sh" ]]; then # We already checked the file exists so its "safe" # shellcheck disable=SC1090,SC1091 diff --git a/shell/settings/bash.sh b/shell/settings/bash.sh index d5a5152..306666e 100755 --- a/shell/settings/bash.sh +++ b/shell/settings/bash.sh @@ -145,7 +145,7 @@ if [[ -f "$BASH_IT/bash_it.sh" ]]; then source "$BASH_IT/bash_it.sh" else - # TODO: May migrate this logic/function to python or go to improve perfomance and better handle output + # TODO: May migrate this logic/function to python or go to improve performance and better handle output __git_info() { if hash git 2>/dev/null; then local branch changes stash info @@ -195,7 +195,7 @@ else } __venv() { - # TODO: May shoud cache the version and clear cache once we deactivate/change virtual env + # TODO: May should cache the version and clear cache once we deactivate/change virtual env if [[ -n $VIRTUAL_ENV ]]; then ENV_VERSION="$(python --version | awk '{print $2}')" export ENV_VERSION="${ENV_VERSION%% *}" diff --git a/shell/settings/zsh.sh b/shell/settings/zsh.sh index 1848664..7d744e6 100755 --- a/shell/settings/zsh.sh +++ b/shell/settings/zsh.sh @@ -125,7 +125,7 @@ compinit # fi # # pip zsh completion end -# Case insesitive tab completion +# Case insensitive tab completion zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' # Colored completion (different colors for dirs/files/etc) diff --git a/shell/zfunctions/_venv b/shell/zfunctions/_venv index 33ccd9c..f7d991c 100755 --- a/shell/zfunctions/_venv +++ b/shell/zfunctions/_venv @@ -1,6 +1,6 @@ #!/usr/bin/env zsh -# TODO: May shoud cache the version and clear cache once we deactivate/change virtual env +# TODO: May should cache the version and clear cache once we deactivate/change virtual env if [[ -n $VIRTUAL_ENV ]]; then env_version="$(python --version | awk '{print $2}')" env_name="${VIRTUAL_ENV##*/}" diff --git a/test/lint.sh b/test/lint.sh index 838a7a9..8256eb5 100755 --- a/test/lint.sh +++ b/test/lint.sh @@ -132,7 +132,7 @@ Usage: Optional Flags - --nolog Disable log writting + --nolog Disable log writing --nocolor Disable color output -v, --verbose Enable debug messages -h, --help Display this help message