diff --git a/dot_zsh_functions b/dot_zsh_functions index 3e46fed..00fa271 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -64,3 +64,16 @@ function top_commands() { function top_commands_full() { history | cat | sed 's/^[0-9 TAB]*//g' | awk '{CMD[$0]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "%\t" a; }' | sort -nr | nl | head -n50 } +function istherenewissues() { + LASTISSUE=$(newissues | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' | head -n1 | awk '{print $2}') + if [[ -f ".newjiraissue" ]] + then + previous_jira_issue=$(cat ".newjiraissue") + if [ "$LASTISSUE" != "$previous_jira_issue" ]; then + newissues + else + echo "no new issue" + fi + fi + echo "$LASTISSUE" > .newjiraissue +} diff --git a/dot_zshrc b/dot_zshrc index 3fd18e5..d864de8 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -94,12 +94,15 @@ source $ZSH/oh-my-zsh.sh . ~/.zsh_functions . ~/.scripts/executable_bootstrap.sh + eval "$(fasd --init auto)" unlink "$HOME/Library/Application Support/Code/User/settings.json" ln -s "$HOME/.config/Code/User/settings.json" "$HOME/Library/Application Support/Code/User/settings.json" #cm apply sh ~/.scripts/resume.sh +# check if we have new jira issues +istherenewissues #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! https://github.com/sdkman/sdkman-cli/issues/613 export SDKMAN_DIR="$HOME/.sdkman"