On Mon, May 22, 2017 at 09:36:37AM +0100, Adam D. Barratt wrote: > On 2017-05-22 9:14, Adrian Bunk wrote: > > devscripts.conf(5) says: > > > > The two configuration files are /etc/devscripts.conf for system-wide > > defaults and ~/.devscripts for per-user settings. They are written > > with bash(1) syntax, but should only have comments and simple variable > > assignments in them; they are both sourced (if present) by many of the > > devscripts scripts. > > > > > > This is a hack, not a proper handling of the configuration. > > fwiw, the maintainers have been in violent agreement with this for years, > but it needs someone with tuits to replace the current situation with a > solution that's usable from all the languages included in devscripts and > maintains the existing semantics (it's not just simple key=value pairs, > users are actively relying on being able to use shell within the file in > some cases, and that at least needs considering).
I see. The "yes" command is especially bad but we can think of many other values causing problem: "true" "false" "exit" "kill" if space is following "=". key= value By rejecting such line in ~/.devscripts should prevent such annoying problem. If you really mean to write such line, we can write: ENV_VAR="" command So this kind of error prone line containing set up can be excluded by a simple grep test: egrep -e '[^\s#]*\w+=\s+[^#]" Also "bash -n" test may be also interesting to catch syntax error. Such restriction are reasonable. Osamu