valis / Reference / API reference
Account command - API reference
Exported surface for the account-command subsystem. Part of the API reference.
Package valis/src/account-command
Functions
command-as-account
(command-as-account account words &key data-root (executable (native-namestring *runtime-pathname*)))
The shell command `sudo -u ACCOUNT [env XDGDATAHOME=PARENT] EXECUTABLE WORDS`. ACCOUNT is written as sudo -u takes it and WORDS as given; neither is quoted, so the caller quotes what needs it. DATA-ROOT, when given, is <xdg-data-home>/valis/ and the command names its parent through XDGDATAHOME: sudo starts the command without the caller's XDGDATAHOME. EXECUTABLE is the absolute path of the valis binary, by default this process's: sudo's securepath need not hold its directory.
shell-word
(shell-word text)
TEXT as one shell word: unchanged when it holds only characters a POSIX shell reads literally, else single-quoted.