Skip to content

Instantly share code, notes, and snippets.

@InTEGr8or
Last active Jan 14, 2021
Embed
What would you like to do?
log_file="notes_log.yml"
log_dir="~/Documents/github/cli-log"
my_log="$log_dir/$log_file"
alias tl-file="echo $my_log"
function wl {
start_dir=$(pwd)
cd "$log_dir"
git pull --quiet
text=""
for word in "$@"
do
text="$text $word"
done
echo "$(date '+%Y-%m-%d %H:%M:%S'):\n $text" >> $my_log
git add .
git commit -m "update"
git push --quiet
cd "$start_dir"
}
function tl {
tail $my_log
}
function pl {
start_dir=$(pwd)
cd "$log_dir"
git pull --quiet
cd "$start_dir"
}
function el {
vim $my_log
}
function test-l {
for word in "$@"
do
echo $word
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment