From 4a985b2ffa0e8807a368a18653fdae84720128d4 Mon Sep 17 00:00:00 2001 From: bretello Date: Sat, 9 Oct 2021 00:03:46 +0200 Subject: [PATCH] zsh: migrate sh -> zsh --- README.md | 6 +++--- aliases.sh => aliases.zsh | 0 brethil_dotfile.sh | 16 +--------------- check_for_update.sh => check_for_update.zsh | 0 colors.sh => colors.zsh | 0 functions.sh => functions.zsh | 2 +- 6 files changed, 5 insertions(+), 19 deletions(-) rename aliases.sh => aliases.zsh (100%) rename check_for_update.sh => check_for_update.zsh (100%) rename colors.sh => colors.zsh (100%) rename functions.sh => functions.zsh (99%) diff --git a/README.md b/README.md index 92f802f..e539f79 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ A set of zsh dotfiles based on antibody and oh-my-zsh ├── README.md ├──────── Main files ──────── - │ ├── aliases.sh + │ ├── aliases.zsh │ │     └── aliases definitions (sources `~/.dotfiles_aliases`) - │ ├── colors.sh + │ ├── colors.zsh │ │     └── ANSI color escapes - │ ├── functions.sh + │ ├── functions.zsh │ │     └── contains function definitions (sources `~/.dotfiles_functions`) │ ├── ansible │ │     └── ansible playboooks/config diff --git a/aliases.sh b/aliases.zsh similarity index 100% rename from aliases.sh rename to aliases.zsh diff --git a/brethil_dotfile.sh b/brethil_dotfile.sh index 611420e..a96859c 100755 --- a/brethil_dotfile.sh +++ b/brethil_dotfile.sh @@ -3,7 +3,7 @@ export LANG=en_US.UTF-8 # Check for update, set DISABLE_UPDATE_PROMPT=true to disable the prompt and automatically update if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then - source "${DOTFILES}/check_for_update.sh" + source "${DOTFILES}/check_for_update.zsh" fi # theme-related variables @@ -12,10 +12,6 @@ export ZSH_THEME="brethil" export DISABLE_UNTRACKED_FILES_DIRTY=true export VIRTUAL_ENV_DISABLE_PROMPT=true -# Setup completion style -source $DOTFILES/completion_style.zsh - - # Source all zsh plugins source <(antibody init) export ANTIBODY="$(antibody home)" @@ -81,15 +77,5 @@ alias aledit='$EDITOR ~/.dotfiles_aliases.sh' export p="${HOME}/projects" -# Extras -functions_file=$DOTFILES/functions.sh # Function definitions -aliases_file=$DOTFILES/aliases.sh # Aliases definitions -colors_file=$DOTFILES/colors.sh # Colors definitions - -# Source extras -if [ -f "$functions_file" ]; then source "$functions_file"; else echo "[brethil-dotfiles] Couldn't load functions: $functions_file"; fi -if [ -f "$aliases_file" ]; then source "$aliases_file"; else echo "[brethil-dotfiles] Couldn't load aliases: $aliases_file"; fi -if [ -f "$colors_file" ]; then source "$colors_file"; else echo "[brethil-dotfiles] Couldn't load colors: $colors_file"; fi - ### SETUP PATHS #### export PATH=$PATH:$HOME/bin diff --git a/check_for_update.sh b/check_for_update.zsh similarity index 100% rename from check_for_update.sh rename to check_for_update.zsh diff --git a/colors.sh b/colors.zsh similarity index 100% rename from colors.sh rename to colors.zsh diff --git a/functions.sh b/functions.zsh similarity index 99% rename from functions.sh rename to functions.zsh index 4381921..28f743a 100755 --- a/functions.sh +++ b/functions.zsh @@ -4,7 +4,7 @@ ## Selfupdate function dotfiles_selfupdate { - (. $DOTFILES/check_for_update.sh && _upgrade_dotfiles) + (. $DOTFILES/check_for_update.zsh && _upgrade_dotfiles) } ## get cheat sheets for commands from cheat.sh. Usage: cheat commandname