From b0f0ce7b8e188ca7d0ec5111520ff2fb039ed113 Mon Sep 17 00:00:00 2001 From: Helior Colorado Date: Fri, 10 Apr 2020 00:13:35 -0700 Subject: [PATCH 1/2] Desperately commenting lines out. --- zsh/zshrc.symlink | 85 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 63 insertions(+), 22 deletions(-) diff --git a/zsh/zshrc.symlink b/zsh/zshrc.symlink index f4440e4..d149c34 100644 --- a/zsh/zshrc.symlink +++ b/zsh/zshrc.symlink @@ -16,43 +16,84 @@ then source ~/.localrc fi -# all of our zsh files -typeset -U config_files -config_files=($ZSH/**/*.zsh) -# load the path files -for file in ${(M)config_files:#*/path.zsh} -do +#--- Clean-up +TIMEFMT=$'\n================\nCPU\t%P\nuser\t%*U\nsystem\t%*S\ntotal\t%*E' + +# getMillisecond() { +# if [[ $(command -V gdate) ]]; then +# echo "$(gdate +%s.%N)" +# else +# echo 0 +# fi +# } + +# subtract() { +# if [[ $(command -V bc) ]]; then +# result=$(bc -l <<<"$1-$2") +# else +# echo "ERROR: 'bc' command not found. Could not compute the 'subtract' function." +# fi +# echo $result +# } + +# timerthen=$(getMillisecond) +config_files=($ZSH/**/*.zsh) +for file in ${config_files[@]}; do + echo $file source $file + # timernow=$(getMillisecond) + # echo "Load ($(subtract $timernow $timerthen) secs) .. \t$file" + # timerthen=$timernow done + +##--------------- +# all of our zsh files +# typeset -U config_files +# config_files=($ZSH/**/*.zsh) + +# timethen=$(date +%s) + +# load the path files +# for file in ${(M)config_files:#*/path.zsh} +# do + # source $file + # timenow=$(date +%s) + # echo "$(($timenow-$timethen))\t : $file" + # timethen=$timenow +# done + # load everything but the path and completion files -for file in ${${config_files:#*/path.zsh}:#*/completion.zsh} -do - source $file -done +# for file in ${${config_files:#*/path.zsh}:#*/completion.zsh} +# do +# source $file +# done # load every completion after autocomplete loads -for file in ${(M)config_files:#*/completion.zsh} -do - source $file -done +# for file in ${(M)config_files:#*/completion.zsh} +# do +# source $file +# timenow=$(date +%s) +# echo "$(($timenow-$timethen))\t : $file" +# timethen=$timenow +# done unset config_files # Lines configured by zsh-newuser-install -HISTFILE=~/.histfile -HISTSIZE=2000 -SAVEHIST=2000 -setopt appendhistory -bindkey -v +# HISTFILE=~/.histfile +# HISTSIZE=2000 +# SAVEHIST=2000 +# setopt appendhistory +# bindkey -v # End of lines configured by zsh-newuser-install -[ -s "$HOME/.scm_breeze/scm_breeze.sh" ] && source "$HOME/.scm_breeze/scm_breeze.sh" +# [ -s "$HOME/.scm_breeze/scm_breeze.sh" ] && source "$HOME/.scm_breeze/scm_breeze.sh" -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm +# export NVM_DIR="$HOME/.nvm" +# [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm From 25ecdc77c616f6582f098d278158c367e26ad0a5 Mon Sep 17 00:00:00 2001 From: Helior Colorado Date: Fri, 10 Apr 2020 00:13:49 -0700 Subject: [PATCH 2/2] Adding current test file --- test.sh | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100755 test.sh diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..bfa2ef9 --- /dev/null +++ b/test.sh @@ -0,0 +1,90 @@ +#!/bin/bash +clear + +# rightnow=$(gdate +%s.%N) +# echo $rightnow + + +# sleep 1 +# echo "$(($(gdate +%s.%N)-$rightnow))" + +export ZSH=$HOME/.dotfiles + +# config_files=($ZSH/**/path.zsh) +# for i in ${config_files[@]}; do echo $i; done +# echo "----\n" + +# config_files=($ZSH/**/completion.zsh) +# for i in ${config_files[@]}; do echo $i; done +# echo "----\n" + + +# ALL *.zsh +config_files=($ZSH/**/*.zsh) +# for file in ${config_files[@]}; do +# echo $file +# done + +# for dir in $ZSH/*; do +# if [ -d $dir ]; then +# # config_files=($dir/*.zsh) +# # for file in ${config_files[@]}; do +# # if [ -f $file ];then +# # echo $file +# # fi +# # done +# echo $dir +# fi +# done + + +# echo ${config_files:#*/path.zsh} +# for file in ${${config_files:#*/path.zsh}:#*/completion.zsh} +# for file in ${config_files:#*/path.zsh} +# do +# echo $file +# done + +# echo "------------FOLDERS" +# for file in ${config_files} +# for d in *; do +# if [ -d "$d" ]; then +# echo $d +# fi +# done + +getMillisecond() { + if [[ $(command -V gdate) ]]; then + echo "$(gdate +%s.%N)" + fi +} + +subtract() { + if [[ $(command -V bc) ]]; then + result=$(bc -l <<<"$1-$2") + else + echo "ERROR: 'bc' command not found. Could not compute the 'subtract' function." + fi + + echo $result +} + +# timethen=$(getMillisecond) +# sleep 1 +# timenow=$(getMillisecond) + +# echo ${timethen} +# echo ${timenow} +# echo "\n" +# delta=$(subtract $timenow $timethen) +# echo $delta +nvm_has() { + type "${1-}" >/dev/null 2>&1 +} + +# ! nvm_has asdf && echo "HELO" +nvm_has asdf && alias asdf='cat' + +asdf_setup() { + echo "this is asdf setup..." +}