From d899eaeeed6e91031b8b4e3a4ed64cb31410a51f Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Wed, 18 Aug 2010 15:57:33 +0200 Subject: automatically call libui_sh_init at the end of the file automatically call libui_sh_init at the end of the file with default options, this way applications using libui-sh are not forced to call libui_sh_init themselves, which was a bit a cumbersome requirement, especially if default options were fine. --- libui.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libui.sh b/libui.sh index 0b5ae6a..8f6ede3 100644 --- a/libui.sh +++ b/libui.sh @@ -5,7 +5,8 @@ # TODO: figure out something to make dia windows always big enough, yet fit nicely in the terminal -# you should call this function when you want to use this library (can be called multiple times, to change ui type or other settings) +# you can call this function to change settings, before calling other libui functions or afterwards +# it must always be called at least once to set the right variables, but it gets automatically called once at the end of this file # $1 ui type (dia or cli). defaults to cli # $2 directory for tmp files. default /tmp (leave empty for default) # $3 logfile (or string of logfiles, separated by whitespace) (leave empty to disable logging) @@ -729,3 +730,7 @@ _cli_follow_progress () [ -n "$3" ] && tail -f $2 --pid=$3 [ -z "$3" ] && tail -f $2 } + + +libui_sh_init + -- cgit v1.2.2