dgamelaunch
dgamelaunch copied to clipboard
Allow importing NETHACKOPTIONS environment variable?
I think it would be great to allow to pass NETHACKOPTIONS envvar through ssh client, and for dgamelaunch to be able to pick it up and pass to NetHack.
Rationale for this, is that most people have their config more-or-less stable, but sometimes you want to change an option or two (and most importantly, have it in bash alias, for instance). For example, I usually prefer 'windowtype:curses' on large screens, but on small-screened devices, such as smartphone, or a small laptop - I'd like to play with "windowtype:tty". Currently, I'd have to edit my NAO config to switch between windowports. But if it would be possible to pass NETHACKOPTIONS through ssh and dgamelaunch - then I'd be able to just set appropriate aliases on different devices and override config defaults automatically.
I believe this shouldn't cause any security issues, because NETHACKOPTIONS is parsed using same parser that reads .nethackrc.
NETHACKOPTIONS is used by dgamelaunch to point NetHack to the player's rc-file on the server, eg it contains something like this: NETHACKOPTIONS=@/dgldir/userdata/f/foo/foo.nh363rc
Oh, didn't think about this, makes sense.