you need to use a if statement if the commands should be listed.
Code:
on *:text:!addcommand *:#: { 
 if ($2 == show) { msg $chan Commands avalible are <enter commands here> | return }
  else {
  write commands.txt $2-
 }
}