Talk:Integrating an Application into a Gnome Environment

From LSDevLinux
Revision as of 09:32, 14 June 2008 by Mayhewn (talk | contribs) ("$@" and --help)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In the example code of the proggy shell script, it's better to use "$@" than $*, since this handles embedded spaces in arguments, eg a file name with a space in it. Note that "$@" resolves to nothing, not even an empty string, if there are no arguments.

The code as it stands also doesn't handle there being a space in $EXE, but generally this should be avoided by the programmer.

--Neil 09:32, 14 June 2008 (MDT)

Regarding --help: in some cases, it may be more appropriate to put the handling into proggy.exe itself. If this help text describes options that proggy.exe itself handles, then ideally it's proggy.exe itself that describes what they do. On the other hand, if the proggy front-end script does some option-handling of its own, then obviously it needs to describe those options since proggy.exe doesn't know anything about them. The example is simple enough that it's not clear which situation is in view. Keeping it simple is good. However, it might be a good idea to mention the alternative treatments briefly.

--Neil 09:32, 14 June 2008 (MDT)