improve vim config + aliases behavior
* disable mouse option in vim (not working well with C/C on mac) * improve function for getting article publication dates
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user