Use whoami in lieu of who + awk script - #132
Conversation
Rationale: ⋅ increased efficiency ⋅ succinctness ⋅ no additional dependencies ⋅ fixes fringe-case bug triggered when "who -m" outputs more than one user, e.g. as with "raspi-config nonint do_audio 1" bound to an Openbox menu item Thank you.
|
These aren't equivalent:
|
|
How is that example relevant, given the parameter expansion of |
|
A more relevant example: |
|
Thank you. The explicit use of Put this in an appropriate place in raspi-config: Then add and execute a window manager hotkey that calls raspi-config non-interactively. With Openbox (i.e. LXDE), execution of the following addition to <keybind key="W-Q"> <action name="Execute"> <command>raspi-config nonint do_audio 0</command> </action> </keybind>... results in the following output at ... an empty file. Thus, the issue is no longer of convenience but of functionality, as there is no way to effectively run raspi-config non-interactively under these circumstances. One solution is in this pull request. Do you offer any others? |
|
Probably best is if @NoSuck I think this would solve your issue? I also added |
Yes, it does. Thank you for the alternative. @XECDesign, does this look good to you? |
Rationale:
⋅ increased efficiency
⋅ succinctness
⋅ no additional dependencies
⋅ fixes fringe-case bug triggered when "who -m" outputs more than one user, e.g. as with "raspi-config nonint do_audio 1" bound to an Openbox menu item
Thank you.