diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-11-03 13:23:05 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-11-03 13:23:05 -0300 |
commit | 121e9ebb3caa4f6259960fb66c6ede0bbc875666 (patch) | |
tree | 191292f7d1e8ce1631995ac1a41f2f336af7328b /libremessages | |
parent | 5863c70d969c4654e0ea99f7b68876bc4aa5770b (diff) |
Set terminal title with libremessages' term_title()
Useful for showing progress
Diffstat (limited to 'libremessages')
-rwxr-xr-x | libremessages | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libremessages b/libremessages index 5d817dd..68badb8 100755 --- a/libremessages +++ b/libremessages @@ -86,6 +86,12 @@ stat_done() { printf "${BOLD}done${ALL_OFF}\n" >&2 } +# Set the terminal title +# TODO test on several terms - it works on screen/tmux +term_title() { + printf "\033k%s\033\\" "$@" +} + # usage : in_array( $needle, $haystack ) in_array() { [[ $2 ]] || return 1 # Not found |