`fullcommand="${0%%*/}"`, which avoids an external command execution.