Skip to content

Instantly share code, notes, and snippets.

@InTEGr8or
Last active January 14, 2021 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save InTEGr8or/93bcbbc534ef0e6eb682f4db40bee3fc to your computer and use it in GitHub Desktop.
Save InTEGr8or/93bcbbc534ef0e6eb682f4db40bee3fc to your computer and use it in GitHub Desktop.
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