Automatically get default command name from directory