diff --git a/dot_vimrc b/dot_vimrc index dbdbee2..83ea6a4 100644 --- a/dot_vimrc +++ b/dot_vimrc @@ -30,8 +30,7 @@ set incsearch set hlsearch " Disable error bells set noerrorbells -" Enable mouse in all modes -set mouse=a + " Don’t show the intro message when starting Vim set shortmess=atI " Show the filename in the window titlebar diff --git a/dot_zsh_aliases b/dot_zsh_aliases index 0ce28a5..9f17697 100644 --- a/dot_zsh_aliases +++ b/dot_zsh_aliases @@ -65,6 +65,7 @@ alias ls='lsd' alias pip='pip3' alias c='cat' alias x='extract' +alias current_year='`echo date +"%Y"`' # Show/hide hidden files in Finder alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" diff --git a/dot_zsh_functions b/dot_zsh_functions index b75829c..650b771 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -78,5 +78,11 @@ function istherenewissues() { echo "$LASTISSUE" > .newjiraissue } function greppagedate() { - curl -sSL "$*" | \grep datetime | \grep -Eo '[[:digit:]]{4}' | head -n1 + year=$(curl -sSL "$*" | tr '<' '\r' | \egrep -i "date|datetime" -A 1 | \grep -Eo '\b[[:digit:]]{4}\b' | head -n1) + yearint=$(($year + 0)) + currentyear=$(echo `date +"%Y"`) + if [[ $yearint -ge 1970 && $yearint -le $currentyear ]] + then + echo "$yearint" + fi }