mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-24 23:56:49 +03:00
Shell 0.4.51. See History.txt for details.
git-svn-id: svn://kolibrios.org@1669 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
4b4d896f8a
commit
1428ddf584
@ -35,8 +35,7 @@
|
||||
#include "cmd/cmd_clear.c"
|
||||
#include "cmd/cmd_ccpuid.c"
|
||||
#include "cmd/cmd_sleep.c"
|
||||
#include "cmd/cmd_turnoff.c"
|
||||
#include "cmd/cmd_kerver.c"
|
||||
#include "cmd/cmd_shutdown.c"
|
||||
#include "cmd/cmd_uptime.c"
|
||||
|
||||
#include "modules/module_command.c"
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,27 +0,0 @@
|
||||
int cmd_kerver(char param[])
|
||||
{
|
||||
char *kvbuf;
|
||||
char *vA, *vB, *vC, *vD;
|
||||
unsigned *Rev;
|
||||
|
||||
kvbuf = malloc(16);
|
||||
kol_get_kernel_ver(kvbuf);
|
||||
vA = kvbuf+0;
|
||||
vA = *vA;
|
||||
vB = kvbuf+1;
|
||||
vB = *vB;
|
||||
vC = kvbuf+2;
|
||||
vC = *vC;
|
||||
vD = kvbuf+3;
|
||||
vD = *vD;
|
||||
Rev = kvbuf+5;
|
||||
Rev = *Rev;
|
||||
|
||||
#if LANG_ENG
|
||||
printf (" KolibriOS v%d.%d.%d.%d. Kernel SVN-rev.: %d\n\r", vA, vB, vC, vD, Rev);
|
||||
#elif LANG_RUS
|
||||
printf (" Š®«¨¡à¨Ž‘ v%d.%d.%d.%d. SVN-ॢ. ï¤à : %d\n\r", vA, vB, vC, vD, Rev);
|
||||
#endif
|
||||
free(kvbuf);
|
||||
return TRUE;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
|
||||
int cmd_turnoff(char param[])
|
||||
int cmd_shutdown(char param[])
|
||||
{
|
||||
kol_system_end(2);
|
||||
return TRUE;
|
@ -1,6 +1,36 @@
|
||||
|
||||
int cmd_ver(char param[])
|
||||
{
|
||||
printf (" %s\n\r", SHELL_VERSION);
|
||||
return TRUE;
|
||||
if (!strcmp(param, "kernel"))
|
||||
{
|
||||
char *kvbuf;
|
||||
char *vA, *vB, *vC, *vD;
|
||||
unsigned *Rev;
|
||||
|
||||
kvbuf = malloc(16);
|
||||
kol_get_kernel_ver(kvbuf);
|
||||
vA = kvbuf+0;
|
||||
vA = *vA;
|
||||
vB = kvbuf+1;
|
||||
vB = *vB;
|
||||
vC = kvbuf+2;
|
||||
vC = *vC;
|
||||
vD = kvbuf+3;
|
||||
vD = *vD;
|
||||
Rev = kvbuf+5;
|
||||
Rev = *Rev;
|
||||
|
||||
#if LANG_ENG
|
||||
printf (" KolibriOS v%d.%d.%d.%d. Kernel SVN-rev.: %d\n\r", vA, vB, vC, vD, Rev);
|
||||
#elif LANG_RUS
|
||||
printf (" Š®«¨¡à¨Ž‘ v%d.%d.%d.%d. SVN-ॢ. ï¤à : %d\n\r", vA, vB, vC, vD, Rev);
|
||||
#endif
|
||||
free(kvbuf);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf (" Shell v%s\n\r", SHELL_VERSION);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
#define SHELL_VERSION "0.4.5"
|
||||
#define SHELL_VERSION "0.4.51"
|
||||
|
||||
extern char PATH[256];
|
||||
extern char PARAM[256];
|
||||
@ -63,8 +63,7 @@ int cmd_rmdir(char dir[]);
|
||||
int cmd_touch(char file[]);
|
||||
int cmd_ver(char arg[]);
|
||||
int cmd_sleep(char arg[]);
|
||||
int cmd_turnoff(char arg[]);
|
||||
int cmd_kerver(char arg[]);
|
||||
int cmd_shutdown(char arg[]);
|
||||
int cmd_uptime(char param[]);
|
||||
|
||||
/// ===========================================================
|
||||
|
@ -1,28 +1,27 @@
|
||||
const command_t COMMANDS[]=
|
||||
{
|
||||
{"about", " Displays information about Shell\n\r", &cmd_about},
|
||||
{"alias", " Allows the user view the current aliases\n\r", &cmd_alias},
|
||||
{"ccpuid", " Displays CPU information\n\r", &cmd_ccpuid},
|
||||
{"cd", " Changes current directory. Usage:\n\r cd <directory name>\n\r", &cmd_cd},
|
||||
{"clear", " Clears the screen\n\r", &cmd_clear},
|
||||
{"date", " Returns the current date and time\n\r", &cmd_date},
|
||||
{"echo", " Echoes the data to the screen. Usage:\n\r echo <data>\n\r", &cmd_echo},
|
||||
{"exit", " Exits from Shell\n\r", &cmd_exit},
|
||||
{"memory", " Displays total, free and used memory\n\r", &cmd_memory},
|
||||
{"help", " Gives help on commands. Usage:\n\r help ;it lists all builtins\n\r help <command> ;help on command\n\r", &cmd_help},
|
||||
{"kerver", " Displays the information about a version of KoOS kernel\n\r", &cmd_kerver},
|
||||
{"kill", " Stops a running process. Usage:\n\r kill <PID of process>\n\r", &cmd_kill},
|
||||
{"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", &cmd_ls},
|
||||
{"mkdir", " Makes directory. Usage:\n\r mkdir <folder name> ;creates the folder in working directory\n\r mkdir <path><folder name> ;create folder by specified path\n\r", &cmd_mkdir},
|
||||
{"more", " Displays a file data to the screen. Usage:\n\r more <file name>\n\r", &cmd_more},
|
||||
{"ps", " Lists the current processes running\n\r", &cmd_ps},
|
||||
{"pwd", " Displays the name of the working directory\n\r", &cmd_pwd},
|
||||
{"reboot", " Reboots the computer or KoOS kernel. Usage:\n\r reboot ;reboot a PC\n\r reboot kernel ;reboot the KoOS kernel\n\r", &cmd_reboot},
|
||||
{"rm", " Removes a file. Usage:\n\r rm file name>\n\r", &cmd_rm},
|
||||
{"rmdir", " Removes a folder. Usage:\n\r rmdir <directory>\n\r", &cmd_rmdir},
|
||||
{"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},
|
||||
{"touch", " Creates an empty file or updates the time/date stamp on a file. Usage:\n\r touch <file name>\n\r", &cmd_touch},
|
||||
{"turnoff"," Turns off the computer\n\r", &cmd_turnoff},
|
||||
{"uptime", " Displays the uptime", &cmd_uptime},
|
||||
{"ver", " Displays version of Shell\n\r", &cmd_ver},
|
||||
{"about", " Displays information about Shell\n\r", &cmd_about},
|
||||
{"alias", " Allows the user view the current aliases\n\r", &cmd_alias},
|
||||
{"ccpuid", " Displays CPU information\n\r", &cmd_ccpuid},
|
||||
{"cd", " Changes current directory. Usage:\n\r cd <directory name>\n\r", &cmd_cd},
|
||||
{"clear", " Clears the screen\n\r", &cmd_clear},
|
||||
{"date", " Returns the current date and time\n\r", &cmd_date},
|
||||
{"echo", " Echoes the data to the screen. Usage:\n\r echo <data>\n\r", &cmd_echo},
|
||||
{"exit", " Exits from Shell\n\r", &cmd_exit},
|
||||
{"memory", " Displays total, free and used memory\n\r", &cmd_memory},
|
||||
{"help", " Gives help on commands. Usage:\n\r help ;it lists all builtins\n\r help <command> ;help on command\n\r", &cmd_help},
|
||||
{"kill", " Stops a running process. Usage:\n\r kill <PID of process>\n\r", &cmd_kill},
|
||||
{"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", &cmd_ls},
|
||||
{"mkdir", " Makes directory. Usage:\n\r mkdir <folder name> ;creates the folder in working directory\n\r mkdir <path><folder name> ;create folder by specified path\n\r", &cmd_mkdir},
|
||||
{"more", " Displays a file data to the screen. Usage:\n\r more <file name>\n\r", &cmd_more},
|
||||
{"ps", " Lists the current processes running\n\r", &cmd_ps},
|
||||
{"pwd", " Displays the name of the working directory\n\r", &cmd_pwd},
|
||||
{"reboot", " Reboots the computer or KoOS kernel. Usage:\n\r reboot ;reboot a PC\n\r reboot kernel ;reboot the KoOS kernel\n\r", &cmd_reboot},
|
||||
{"rm", " Removes a file. Usage:\n\r rm file name>\n\r", &cmd_rm},
|
||||
{"rmdir", " Removes a folder. Usage:\n\r rmdir <directory>\n\r", &cmd_rmdir},
|
||||
{"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},
|
||||
{"shutdown"," Turns off the computer\n\r", &cmd_shutdown},
|
||||
{"touch", " Creates an empty file or updates the time/date stamp on a file. Usage:\n\r touch <file name>\n\r", &cmd_touch},
|
||||
{"uptime", " Displays the uptime", &cmd_uptime},
|
||||
{"ver", " Displays version. Usage:\n\r ver ;Shell version\n\r ver kernel ;version of KoOS kernel\n\r", &cmd_ver},
|
||||
};
|
@ -1,28 +1,27 @@
|
||||
const command_t COMMANDS[]=
|
||||
{
|
||||
{"about", " ‚뢮¤¨â ¨ä®à¬ æ¨î ® ¯à®£à ¬¬¥ Shell\n\r", &cmd_about},
|
||||
{"alias", " <20>®ª §ë¢ ¥â ᯨ᮪ alias'®¢\n\r", &cmd_alias},
|
||||
{"ccpuid", " ‚뢮¤¨â ¨ä®à¬ æ¨î ® CPU\n\r", &cmd_ccpuid},
|
||||
{"cd", " ˆ§¬¥ï¥â ⥪ãéãî ¤¥à¨ªâ®à¨î. ˆá¯®«ì§®¢ ¨¥:\n\r cd <¤¨à¥ªâ®à¨ï>\n\r", &cmd_cd},
|
||||
{"clear", " Žç¨é ¥â íªà \n\r", &cmd_clear},
|
||||
{"date", " <20>®ª §ë¢ ¥â ⥪ãéãî ¤ âã ¨ ¢à¥¬ï\n\r", &cmd_date},
|
||||
{"echo", " ‚뢮¤¨â ¤ ë¥ íªà . ˆá¯®«ì§®¢ ¨¥:\n\r echo <¤ ë¥>\n\r", &cmd_echo},
|
||||
{"exit", " ‚ë室 ¨§ ª®á®«¨\n\r", &cmd_exit},
|
||||
{"memory", " <20>®ª §ë¢ ¥â ®¡êñ¬ ¯ ¬ïâ¨: ¢á¥©, ᢮¡®¤®© ¨ ¨á¯®«ì§ã¥¬®©\n\r", &cmd_memory},
|
||||
{"help", " ‘¯à ¢ª ¯® ª®¬ ¤ ¬. ˆá¯®«ì§®¢ ¨¥:\n\r help ;ᯨ᮪ ¢á¥å ª®¬ ¤\n\r help <ª®¬ ¤ > ;á¯à ¢ª ¯® ª®¬ ¤¥\n\r", &cmd_help},
|
||||
{"kerver", " ‚뢮¤¨â ¨ä®à¬ æ¨î ® ¢¥àᨨ ï¤à KoOS\n\r", &cmd_kerver},
|
||||
{"kill", " “¡¨¢ ¥â ¯à®æ¥áá. ˆá¯®«ì§®¢ ¨¥:\n\r kill <PID ¯à®æ¥áá >\n\r", &cmd_kill},
|
||||
{"ls", " ‚뢮¤¨â ᯨ᮪ ä ©«®¢. ˆá¯®«ì§®¢ ¨¥:\n\r ls ;ᯨ᮪ ä ©«®¢ ¢ ⥪ã饬 ª â «®£¥\n\r ls <¤¨à¥ªâ®à¨ï> ;ᯨ᮪ ä ©«®¢ ¨§ § ¤ ®© ¤¨à¥ªâ®à¨¨\n\r", &cmd_ls},
|
||||
{"mkdir", " ‘®§¤ ¥â ª â «®£. ˆá¯®«ì§®¢ ¨¥:\n\r mkdir <¨¬ï ¯ ¯ª¨> ;ᮧ¤ âì ¯ ¯ªã ¢ ⥪ã饬 ª â «®£¥\n\r mkdir <¯ãâì><¨¬ï ¯ ¯ª¨> ;ᮧ¤ âì ¯ ¯ªã ¯® 㪠§ ®¬ã ¯ãâ¨\n\r", &cmd_mkdir},
|
||||
{"more", " ‚뢮¤¨â ᮤ¥à¦¨¬®¥ ä ©« íªà . ˆá¯®«ì§®¢ ¨¥:\n\r more <¨¬ï ä ©« >\n\r", &cmd_more},
|
||||
{"ps", " ‚뢮¤¨â ᯨ᮪ ¯à®æ¥áᮢ\n\r", &cmd_ps},
|
||||
{"pwd", " <20>®ª §ë¢ ¥â ¨¬ï ⥪ã饩 ¤¨à¥ªâ®à¨¨\n\r", &cmd_pwd},
|
||||
{"reboot", " <20>¥à¥§ £à㦠¥â ª®¬¯ìîâ¥à ¨«¨ ï¤à® KoOS. ˆá¯®«ì§®¢ ¨¥:\n\r reboot ;¯¥à¥§ £à㧨âì <20>Š\n\r reboot kernel ;¯¥à¥§ ¯ãáâ¨âì ï¤à® Kolibri\n\r", &cmd_reboot},
|
||||
{"rm", " “¤ «ï¥â ä ©«. ˆá¯®«ì§®¢ ¨¥:\n\r rm <¨¬ï ä ©« >\n\r", &cmd_rm},
|
||||
{"rmdir", " “¤ «ï¥â ¯ ¯ªã. ˆá¯®«ì§®¢ ¨¥:\n\r rmdir <¤¨à¥ªâ®à¨ï>\n\r", &cmd_rmdir},
|
||||
{"sleep", " Žáâ ¢«¨¢ ¥â à ¡®âã Shell' § ¤ ®¥ ¢à¥¬ï. ˆá¯®«ì§®¢ ¨¥:\n\r sleep <¨â¥à¢ « ¢ á®âëå ¤®«ï ᥪã¤ë>\n\r <20>ਬ¥à:\n\r sleep 500 ;¯ 㧠5 ᥪ.\n\r", &cmd_sleep},
|
||||
{"touch", " ‘®§¤ ñâ ¯ãá⮩ ä ©« ¨«¨ ¨§¬¥ï¥â ¤ âã/¢à¥¬ï ᮧ¤ ¨ï ä ©« . ˆá¯®«ì§®¢ ¨¥:\n\r touch <¨¬ï ä ©« >\n\r", &cmd_touch},
|
||||
{"turnoff"," ‚몫îç ¥â ª®¬¯ìîâ¥à\n\r", &cmd_turnoff},
|
||||
{"uptime", " <20>®ª §ë¢ ¥â uptime", &cmd_uptime},
|
||||
{"ver", " <20>®ª §ë¢ ¥â ¢¥àá¨î Shell' \n\r", &cmd_ver},
|
||||
{"about", " ‚뢮¤¨â ¨ä®à¬ æ¨î ® ¯à®£à ¬¬¥ Shell\n\r", &cmd_about},
|
||||
{"alias", " <20>®ª §ë¢ ¥â ᯨ᮪ alias'®¢\n\r", &cmd_alias},
|
||||
{"ccpuid", " ‚뢮¤¨â ¨ä®à¬ æ¨î ® CPU\n\r", &cmd_ccpuid},
|
||||
{"cd", " ˆ§¬¥ï¥â ⥪ãéãî ¤¥à¨ªâ®à¨î. ˆá¯®«ì§®¢ ¨¥:\n\r cd <¤¨à¥ªâ®à¨ï>\n\r", &cmd_cd},
|
||||
{"clear", " Žç¨é ¥â íªà \n\r", &cmd_clear},
|
||||
{"date", " <20>®ª §ë¢ ¥â ⥪ãéãî ¤ âã ¨ ¢à¥¬ï\n\r", &cmd_date},
|
||||
{"echo", " ‚뢮¤¨â ¤ ë¥ íªà . ˆá¯®«ì§®¢ ¨¥:\n\r echo <¤ ë¥>\n\r", &cmd_echo},
|
||||
{"exit", " ‚ë室 ¨§ ª®á®«¨\n\r", &cmd_exit},
|
||||
{"memory", " <20>®ª §ë¢ ¥â ®¡êñ¬ ¯ ¬ïâ¨: ¢á¥©, ᢮¡®¤®© ¨ ¨á¯®«ì§ã¥¬®©\n\r", &cmd_memory},
|
||||
{"help", " ‘¯à ¢ª ¯® ª®¬ ¤ ¬. ˆá¯®«ì§®¢ ¨¥:\n\r help ;ᯨ᮪ ¢á¥å ª®¬ ¤\n\r help <ª®¬ ¤ > ;á¯à ¢ª ¯® ª®¬ ¤¥\n\r", &cmd_help},
|
||||
{"kill", " “¡¨¢ ¥â ¯à®æ¥áá. ˆá¯®«ì§®¢ ¨¥:\n\r kill <PID ¯à®æ¥áá >\n\r", &cmd_kill},
|
||||
{"ls", " ‚뢮¤¨â ᯨ᮪ ä ©«®¢. ˆá¯®«ì§®¢ ¨¥:\n\r ls ;ᯨ᮪ ä ©«®¢ ¢ ⥪ã饬 ª â «®£¥\n\r ls <¤¨à¥ªâ®à¨ï> ;ᯨ᮪ ä ©«®¢ ¨§ § ¤ ®© ¤¨à¥ªâ®à¨¨\n\r", &cmd_ls},
|
||||
{"mkdir", " ‘®§¤ ¥â ª â «®£. ˆá¯®«ì§®¢ ¨¥:\n\r mkdir <¨¬ï ¯ ¯ª¨> ;ᮧ¤ âì ¯ ¯ªã ¢ ⥪ã饬 ª â «®£¥\n\r mkdir <¯ãâì><¨¬ï ¯ ¯ª¨> ;ᮧ¤ âì ¯ ¯ªã ¯® 㪠§ ®¬ã ¯ãâ¨\n\r", &cmd_mkdir},
|
||||
{"more", " ‚뢮¤¨â ᮤ¥à¦¨¬®¥ ä ©« íªà . ˆá¯®«ì§®¢ ¨¥:\n\r more <¨¬ï ä ©« >\n\r", &cmd_more},
|
||||
{"ps", " ‚뢮¤¨â ᯨ᮪ ¯à®æ¥áᮢ\n\r", &cmd_ps},
|
||||
{"pwd", " <20>®ª §ë¢ ¥â ¨¬ï ⥪ã饩 ¤¨à¥ªâ®à¨¨\n\r", &cmd_pwd},
|
||||
{"reboot", " <20>¥à¥§ £à㦠¥â ª®¬¯ìîâ¥à ¨«¨ ï¤à® KoOS. ˆá¯®«ì§®¢ ¨¥:\n\r reboot ;¯¥à¥§ £à㧨âì <20>Š\n\r reboot kernel ;¯¥à¥§ ¯ãáâ¨âì ï¤à® Kolibri\n\r", &cmd_reboot},
|
||||
{"rm", " “¤ «ï¥â ä ©«. ˆá¯®«ì§®¢ ¨¥:\n\r rm <¨¬ï ä ©« >\n\r", &cmd_rm},
|
||||
{"rmdir", " “¤ «ï¥â ¯ ¯ªã. ˆá¯®«ì§®¢ ¨¥:\n\r rmdir <¤¨à¥ªâ®à¨ï>\n\r", &cmd_rmdir},
|
||||
{"sleep", " Žáâ ¢«¨¢ ¥â à ¡®âã Shell' § ¤ ®¥ ¢à¥¬ï. ˆá¯®«ì§®¢ ¨¥:\n\r sleep <¨â¥à¢ « ¢ á®âëå ¤®«ï ᥪã¤ë>\n\r <20>ਬ¥à:\n\r sleep 500 ;¯ 㧠5 ᥪ.\n\r", &cmd_sleep},
|
||||
{"shutdown"," ‚몫îç ¥â ª®¬¯ìîâ¥à\n\r", &cmd_shutdown},
|
||||
{"touch", " ‘®§¤ ñâ ¯ãá⮩ ä ©« ¨«¨ ¨§¬¥ï¥â ¤ âã/¢à¥¬ï ᮧ¤ ¨ï ä ©« . ˆá¯®«ì§®¢ ¨¥:\n\r touch <¨¬ï ä ©« >\n\r", &cmd_touch},
|
||||
{"uptime", " <20>®ª §ë¢ ¥â uptime", &cmd_uptime},
|
||||
{"ver", " <20>®ª §ë¢ ¥â ¢¥àá¨î. ˆá¯®«ì§®¢ ¨¥:\n\r ver ;¢¥àá¨ï Shell' \n\r ver kernel ;¢¥àá¨ï ¨ ®¬¥à ॢ¨§¨¨ ï¤à Š®Ž‘\n\r", &cmd_ver},
|
||||
};
|
Loading…
Reference in New Issue
Block a user