--- 2003-02-28-17/moz Fri Feb 28 17:30:42 2003 +++ latest/moz Sat Mar 8 06:00:25 2003 @@ -1,5 +1,5 @@ #!/bin/sh - ver="0.2.2b+.2003022817" + ver="0.2.2b+.2003030806" copy="2002, 2003" mail="PointedEars@gmx.de" mail_feedback="bug-moz@PointedEars.de" @@ -56,6 +56,7 @@ mail_feedback="bug-moz@PointedEars.de" # * If not running on first argument, wait for the process # [with `-remote ping()'] before passing on to the second argument # * _XPG=1 for `$( `$command` )' and `$(( `$expression` ))' in `sh' (@IRIX 6.5) + # * `--version': Display version information and exit # * Cosmetics: # - Added status messages # - Bold-formatted title with changed tagline @@ -207,9 +208,9 @@ function msg_failed { function help { echo echo "${extd}`basename "$1"`${norm} - [${extd}-v${norm}] [${extd}-L${norm} LOCALE] [${extd}-M${norm} COMMAND] \ - [ ( ${extd}-?${norm} | ${extd}--term${norm} | ${extd}--kill${norm} | \ - ${extd}-l${norm} ) ] + [${extd}-v${norm}] [${extd}-L${norm} LOCALE] [${extd}-M${norm} COMMAND] + [ ( ${extd}-?${norm} | ${extd}--version${norm} | ${extd}--term${norm} | \ + ${extd}--kill${norm} | ${extd}-l${norm} [${extd}-f${norm}] ) ] [ ( [ ( ${extd}-w${norm} | ${extd}-t${norm} ) ] [URI] [...] | ${extd}-${norm} \ ) [...] ] [ ( ${extd}-m${norm} [ADDRESS[,...]] | ${extd}-i${norm} | ${extd}-c${norm} ) \ @@ -278,6 +279,9 @@ L "\ echo -n " ${extd}-?${norm}, ${extd}--help${norm} " L "Display this help and exit." "Anzeige dieser Hilfe und beenden." | $fold + echo -n " ${extd}--version${norm} " + L "Display version information and exit." "Anzeige der Version und beenden." | $fold + # version 0.2.3 proposal # echo " --block Block the shell for the 'mozilla' process, i.e. prevent" # echo " following commands to be executed until Mozilla is \ @@ -333,6 +337,15 @@ L "\ echo -n " ${extd}-l${norm}, ${extd}--list${norm} " L "List running Mozilla processes and exit." \ "Zeigt laufende Mozilla-Prozesse an." | $fold + + echo -n " ${extd}-f${norm} " + L "Force full output format. The default is to use the" \ + "Erzwinge das vollständige Ausgabeformat. Standardmässig" | $fold + L "\ + user-oriented format if supported. ${extd}For future use.${norm}" \ + "\ + wird das benutzerorientierte Format benutzt, falls es + unterstützt wird. ${extd}Für zukünftige Verwendung.${norm}" | $fmt echo -n " ${extd}-n${norm}, ${extd}--new${norm} " L "Same as \`${extd}-w${norm}'. For backwards compatibility only," \ @@ -524,6 +537,7 @@ echo `L "Send suggestions and bug report "Senden Sie Vorschläge und Fehlerberichte an"`" <$mail_feedback> " | $fold + test "$1" = "--version" && exit 0 test $help -eq 1 && exit 255 @@ -543,7 +557,7 @@ if [ "$1" = "--list" ] || [ "$1" = "-l" # check for supported `ps' options whoami=`whoami` # BSD style user-oriented - args="u" + args="u $2 " ps $args 1>/dev/null 2>&1 if [ $? -eq 0 ]; then fallback=$args @@ -615,6 +629,7 @@ while [ -n "$1" ]; do mailto=0 inbox=0 compose=0 + uri="" cmd="" case "$1" in # check for new-window @@ -631,13 +646,16 @@ while [ -n "$1" ]; do "-m" | "--mailto") mailto=1 shift + uri="-mail" cmd="mailto($1)";; "-i" | "--inbox") inbox=1 + uri="-mail" cmd="xfeDoCommand(openInbox)" shift;; "-c" | "--compose") compose=1 + uri="-compose $2" cmd="xfeDoCommand(composeMessage)" shift;; # check for disabling new-* @@ -652,15 +670,17 @@ while [ -n "$1" ]; do _XPG=1 chk=`ps -fu $(whoami) 2> /dev/null | grep mozilla-bin | grep -v grep` _XPG=0 + test -z "$uri" && uri="$1" if [ -z "$chk" ]; then echo -n `L "Starting a new Mozilla process" \ "Starte einen neuen Mozilla-Prozess"` - test -n "$1" && echo -n " "`L "with URI" "mit dem URI"`" '$1'" + test -n "$uri" && test $mailto -eq 1 && test $inbox -eq 0 && test $compose -eq 0 \ + echo -n " "`L "with URI" "mit dem URI"`" '$uri'" echo -n "... " #if [ $block -eq 1 ]; then # mozilla "$1" #else - mozilla "$1" & + mozilla "$uri" & #fi error=$? if [ -n "$2" ]; then @@ -709,7 +729,6 @@ Bitte überprüfen Sie ihre Mozilla-Instal fi else # check what kind of URI was given - uri="$1" if [ -z "$cmd" ]; then cmd="openURL($uri" test $new_win -eq 1 && cmd=$cmd", new-window"