Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -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..."
}
85 changes: 63 additions & 22 deletions zsh/zshrc.symlink
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,87 @@ 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
# --------------

# The next line updates PATH for the Google Cloud SDK.
Expand Down