diff --git a/README.md b/README.md index ed5841c..a38731a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ creates a 4GB RAM disk This can be enabled in ~/.ssh/config globally for all hosts by uncommenting the relevant `Host * Remoteforward`. You might have to manually edit the username in the mecp definition in functions.sh if this is different between the two machines. mecp copies by default on the local machine on ~/Desktop/ - 5. Many more. Type "list_functions" to list defined functions and a small description +5. Many more. Type "list_functions" to list defined functions and a small description ### Files/Folders ### diff --git a/aliases.sh b/aliases.sh index ca8b938..991f90e 100755 --- a/aliases.sh +++ b/aliases.sh @@ -2,7 +2,6 @@ #### ALIAS # ########################### - #### #### Easier life (MAC SPECIFIC) #### @@ -73,7 +72,7 @@ alias ssh1="ssh -o ControlMaster=no" # Some colorizing options for grc -GRC=`which grc` +GRC=$(which grc) if [ "$TERM" != dumb ] && [ -n "$GRC" ]; then #alias colourify="$GRC -es --colour=auto" alias colourify="$GRC --colour=auto" diff --git a/brethil_dotfile.sh b/brethil_dotfile.sh index 2104b67..6b1e590 100755 --- a/brethil_dotfile.sh +++ b/brethil_dotfile.sh @@ -6,19 +6,31 @@ shared_plugins=(git brew common-aliases fast-syntax-highlighting zsh-autosuggest uname=$(uname -a) if [[ $uname == *"Darwin"* ]]; then - os_extra=(osx brew) + if [[ $(which brew) ]]; then + os_extra=(osx brew) + elif [[ $(which port)]]; then + os_extra=(osx macports) + else + os_extra=(osx) + fi elif [[ $uname == *"ARCH"* ]]; then os_extra=(archlinux) elif [[ $uname == *"Debian"* ]]; then os_extra=(debian) fi + +# https://www.xkcd.com/378/ +export EDITOR="vim" + plugins=($shared_plugins $os_extra) +alias esource="$EDITOR $HOME/.zshrc" alias resource="source $HOME/.zshrc" alias dotedit="$EDITOR $DOTFILES/brethil_dotfile.sh" -alias funedit="$EDITOR $DOTFILES/functions.sh" -alias aledit="$EDITOR $DOTFILES/aliases.sh" +# Custom definitions files +alias funedit="$EDITOR ~/.dotfiles_functions.sh" +alias aledit="$EDITOR ~/.dotfiles_aliases.sh" # Extras functions_file=$DOTFILES/functions.sh # Function definitions @@ -26,11 +38,9 @@ aliases_file=$DOTFILES/aliases.sh # Aliases definitions colors_file=$DOTFILES/colors.sh # Colors definitions # Source extras -if [ -f $functions_file ]; then source $functions_file; fi -if [ -f $aliases_file ]; then source $aliases_file; fi -if [ -f $colors_file ]; then source $colors_file; fi - -export EDITOR="vim" +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