Skip to content

Instantly share code, notes, and snippets.

@ryan953
Created March 19, 2017 04:53
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 ryan953/b8482271d6ab1352da8fb16341f33ae5 to your computer and use it in GitHub Desktop.
Save ryan953/b8482271d6ab1352da8fb16341f33ae5 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
pr() {
for j in {1..20}; do
echo $j
done
}
main() {
pr
# see http://www.termsys.demon.co.uk/vtansi.htm
# echo -en "\x1B[8A"
printf "\033[8A"
printf "\x1B[0K\rnew line"
echo ""
git branch -v
# git log --graph --oneline --branches
# this seems good as a smart-log starting point
# git log --oneline --graph --decorate $(git branch | tr -d ' *' | awk '{ print "master~1.."$0 }')
}
# F Scroll forward, and keep trying to read when the end of
# file is reached. Normally this command would be used when
# already at the end of the file. It is a way to monitor
# the tail of a file which is growing while it is being
# viewed. (The behavior is similar to the "tail -f" com-
# mand.)
# -X or --no-init
# Disables sending the termcap initialization and deinitial-
# ization strings to the terminal. This is sometimes desir-
# able if the deinitialization string does something unnec-
# essary, like clearing the screen.
# r or ^R or ^L
# Repaint the screen.
main | less -FXr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment