]> gitweb.fluxo.info Git - timelog.git/commitdiff
Enhancing timelog_window_title()
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 24 Oct 2014 18:35:58 +0000 (16:35 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 24 Oct 2014 18:35:58 +0000 (16:35 -0200)
timelog

diff --git a/timelog b/timelog
index 4dbbbc65015dc5165d88f9b02c077f417f8e95d4..f3f753d9af7be5158b343a397ec40c866fcf4aec 100755 (executable)
--- a/timelog
+++ b/timelog
@@ -21,9 +21,9 @@ EDITOR=${EDITOR:=vi}
 # http://stackoverflow.com/questions/899609/gnu-screen-run-script-that-sends-commands-to-the-screen-session-it-is-being-run
 function timelog_window_title {
   if [ -n "$STY" ]; then
-    screen -p $WINDOW -X title $1
+    screen -p $WINDOW -X title "$*"
   else
-    xtitle $1
+    xtitle "$*"
   fi
 }
 
@@ -79,21 +79,25 @@ function timelog_menu {
       exit 1
     fi
   else
-    echo "Usage: $BASENAME <group> [edit]"
+    echo "Usage: $BASENAME [group] [edit]"
     exit 1
   fi
 }
 
-# Run
+# Run worklog for a given project
 function timelog_run {
+  # Set window title
   timelog_window_title "log: $GROUP"
 
+  # Set base folder
   if [ -d "$CODE/$GROUP" ] && [ ! -d "$BASE/$GROUP" ]; then
     BASE="$CODE"
   fi
 
+  # Ensure folder exist
   mkdir -p $BASE/$GROUP/worklog
 
+  # Run
   if [ ! -e "$BASE/$GROUP/worklog/projects" ]; then
     timelog_setup
   elif [ "$ACTION" == "edit" ]; then