improved the implementation of the shell

*Using a more flexible way to declare command
  |-Modified the related structure definition
  |-Using preprocessor instruction to declare command
  |-Modified the related code which using the original structure