Small uypdates

This commit is contained in:
Jonathan Hodgson 2017-08-15 17:22:30 +01:00
parent 2d9aefe519
commit e80d2cbcda
2 changed files with 4 additions and 3 deletions

View file

@ -4,5 +4,7 @@ markup=$(curl https://www.packtpub.com/packt/offers/free-learning 2> /dev/null |
#img=$(echo "$markup" | sed -n "/dotd-main-book-image/,$ p" | head | sed -n "/<img/ p" | sed -nr "s/.*<img.*?src=[\"|'](.*?)[\"|'].*/\3/p")
img=$(echo "$markup" | sed -n "/dotd-main-book-image/,$ p" | head | sed -n "/<img/ p" | sed -nr 's/.*?<img src="([^"]*)".*img.*/\1/p')
curl "$img" > /tmp/freeBook 2> /dev/null
clear
imgcat /tmp/freeBook
rm /tmp/freeBook
echo "https://www.packtpub.com/packt/offers/free-learning#"

View file

@ -3,7 +3,7 @@ echo "syntax on">>~/.vimrc
echo "set number">>~/.vimrc
echo "set incsearch">>~/.vimrc
TERM=xterm-256color
export TERM=xterm-256color
alias vim="vi"
@ -16,11 +16,10 @@ if [ -f /usr/share/git/completion/git-completion.bash ]; then
source /usr/share/git/completion/git-completion.bash
source /usr/share/git/completion/git-prompt.sh
elif [ -f /usr/share/git-core/contrib/completion/git-completion.bash ]; then
echo "I get here"
source /usr/share/git-core/contrib/completion/git-completion.bash
source /usr/share/git-core/contrib/completion/git-prompt.sh
else
echo "For some reason, no git completion"
#echo "For some reason, no git completion"
fi
# Reset
Color_Off="\[\033[0m\]" # Text Reset