Skip to content

Instantly share code, notes, and snippets.

@keisukefukuda
Last active January 30, 2018 20:33
Show Gist options
  • Save keisukefukuda/fdabe26101ce9fb0d3ca to your computer and use it in GitHub Desktop.
Save keisukefukuda/fdabe26101ce9fb0d3ca to your computer and use it in GitHub Desktop.
A general-purpose bash script template file
#!/bin/sh
# Written by Keisuke Fukuda
# Except explicitly stated, all right reserved by Keisuke Fukuda and
# the script is licensed under the MIT license.
# bash options
#set -e
function main {
}
# Function tabname & winname
# Credit: Jamie Hill
# Copied from http://thelucid.com/2012/01/04/naming-your-terminal-tabs-in-osx-lion/
function tabname {
printf "\e]1;$1\a"
}
function winname {
printf "\e]2;$1\a"
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment