Subversion Repositories Kolibri OS

Rev

Rev 8827 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. const command_t COMMANDS[]=
  3. {
  4.         {"about",   "  Displays information about Shell\n\r", &cmd_about},
  5.         {"alias",   "  Allows the user view the current aliases\n\r", &cmd_alias},
  6.         {"cd",      "  Changes current directory. Usage:\n\r    cd <directory name>\n\r", &cmd_cd},
  7.         {"clear",   "  Clears the screen\n\r", &cmd_clear},
  8.         {"cp",      "  Copies file\n\r", &cmd_cp},
  9.         {"mv",      "  Moves file\n\r", &cmd_mv},
  10.         {"ren",     "  Renames file\n\r", &cmd_ren},
  11.         {"date",    "  Returns the current date and time\n\r", &cmd_date},
  12.         {"echo",    "  Echoes the data to the screen. Usage:\n\r    echo <data>\n\r", &cmd_echo},
  13.         {"exit",    "  Exits from Shell\n\r", &cmd_exit},
  14.         {"free",    "  Displays total, free and used memory\n\r", &cmd_memory},
  15.         {"help",    "  Gives help on commands. Usage:\n\r    help ;it lists all builtins\n\r    help <command> ;help on command\n\r", &cmd_help},
  16.         {"history", "  Lists used commands\n\r", &cmd_history},
  17.         {"kfetch",  "  Prints logo and information about system.\n\r", &cmd_kfetch},
  18.         {"kill",    "  Stops a running process. Usage:\n\r    kill <PID of process>\n\r    kill all\n\r", &cmd_kill},
  19.         {"pkill",   "  Kills all processes by name. Usage:\n\r    pkill <process_name>\n\r", &cmd_pkill},
  20.         {"ls",      "  Lists the files in a directory. Usage:\n\r    ls ;lists the files in current directory\n\r    ls <directory> ;lists the files at specified folder\n\r    ls -1 ;lists the files in a single column\n\r", &cmd_ls},
  21.         {"mkdir",   "  Create directory and parent directories as needed. Usage:\n\r    mkdir <folder/name>\n\r", &cmd_mkdir},
  22.         {"more",    "  Displays a file data to the screen. Usage:\n\r    more <file name>\n\r", &cmd_more},
  23.         {"ps",      "  Lists the current processes running\n\r  or shows more info on <procname> and save LASTPID\n\r", &cmd_ps},
  24.         {"pwd",     "  Displays the name of the working directory\n\r", &cmd_pwd},
  25.         {"reboot",  "  Reboots the computer or KolibriOS kernel. Usage:\n\r    reboot ;reboot a PC\n\r    reboot kernel ;reboot the KolibriOS kernel\n\r", &cmd_reboot},
  26.         {"rm",      "  Removes a file. Usage:\n\r    rm file name>\n\r", &cmd_rm},
  27.         {"rmdir",   "  Removes a folder. Usage:\n\r    rmdir <directory>\n\r", &cmd_rmdir},
  28.         {"shutdown","  Turns off the computer\n\r", &cmd_shutdown},
  29.         {"sleep",   "  Stops the shell for the desired period. Usage:\n\r    sleep <time in the 1/100 of second>\n\r  Example:\n\r    sleep 500 ;pause for 5sec.\n\r", &cmd_sleep},
  30.         {"touch",   "  Creates an empty file or updates the time/date stamp on a file. Usage:\n\r    touch <file name>\n\r", &cmd_touch},
  31.         {"uptime",  "  Displays the uptime\n\r", &cmd_uptime},
  32.         {"ver",     "  Displays version. Usage:\n\r    ver ;Shell version\n\r    ver kernel ;version of KolibriOS kernel\n\r    ver cpu ;information about CPU\n\r", &cmd_ver},
  33.         {"waitfor", "  Stops console waiting while process finish. Usage:\n\r    waitfor ;waiting previous started executable LASTPID\n\r    waitfor <PID>;awaiting PID finish\n\r", &cmd_waitfor},
  34. };
  35.  
  36. #define CMD_ABOUT_MSG "Shell %s\n\r"
  37. #define CMD_CD_USAGE "  cd <directory>\n\r"
  38. #define CMD_CP_USAGE "  cp <file_in> <file_out>\n\r"
  39. #define CMD_DATE_DATE_FMT "  Date [dd.mm.yy]: %x%x.%x%x.%x%x"
  40. #define CMD_DATE_TIME_FMT "\n\r  Time [hh:mm:ss]: %x%x:%x%x:%x%x\n\r"
  41. #define CMD_FREE_FMT "  Total [kB / MB / %%]:  %-7d / %-5d / 100\n\r   Free [kB / MB / %%]:  %-7d / %-5d / %d\n\r   Used [kB / MB / %%]:  %-7d / %-5d / %d\n\r"
  42. #define CMD_HELP_AVAIL "  %d commands available:\n\r"
  43. #define CMD_HELP_CMD_NOT_FOUND "  Command \'%s\' not found.\n\r"
  44.  
  45. #define CMD_KILL_USAGE "  kill <PID>\n\r"
  46. #define CMD_MKDIR_USAGE "  mkdir <directory>\n\r"
  47. #define CMD_MORE_USAGE "  more <filename>\n\r"
  48. #define CMD_MV_USAGE "  mv <file_in> <file_out>\n\r"
  49.  
  50. #define CMD_PKILL_HELP      "  pkill <process_name>\n\r"
  51. #define CMD_PKILL_KILL      "  PID: %u - killed\n"
  52. #define CMD_PKILL_NOT_KILL  "  PID: %u - not killed\n"
  53. #define CMD_PKILL_NOT_FOUND "  No processes with this name were found!\n"
  54.  
  55. #define CMD_REN_USAGE "  ren <file> <new_name>\n\r"
  56. #define CMD_RM_USAGE "  rm <filename>\n\r"
  57. #define CMD_RMDIR_USAGE "  rmdir <directory>\n\r"
  58. #define CMD_SLEEP_USAGE "    sleep <time in the 1/100 of second>\n\r"
  59. #define CMD_TOUCH_USAGE "  touch <filename>\n\r"
  60. #define CMD_UPTIME_FMT "  Uptime: %d day(s), %d:%d:%d.%d\n\r"
  61. #define CMD_VER_FMT1 "  KolibriOS v%d.%d.%d.%d. Kernel SVN-rev.: %d\n\r"
  62. #define CMD_WAITFOR_FMT "  Awaing finish PID %d\n\r"
  63. #define EXEC_STARTED_FMT "  '%s' started. PID = %d\n\r"
  64. #define EXEC_SCRIPT_ERROR_FMT "Error in '%s' : script must start with #SHS line\n\r"
  65. #define UNKNOWN_CMD_ERROR "  Error!\n\r"
  66. #define CON_APP_ERROR "  Error in console application.\n\r"
  67. #define FILE_NOT_FOUND_ERROR "  File '%s' not found.\n\r"
  68.