diff --git a/programs/system/shell/History.txt b/programs/system/shell/History.txt new file mode 100644 index 000000000..81f65e9de --- /dev/null +++ b/programs/system/shell/History.txt @@ -0,0 +1,102 @@ +Shell 0.4.5 // 19.10.2010 // Pterox +======================================= +Программа теперь многоязыковая (английский, и русский язык). Программа полностью русифицированна. +* Команда "free" перименована в "memory" - для точности. +* Добавлены команды turnoff (выключить компьютер), kerver (версия ядра KoOS), uptime; reboot теперь может перезагружать ядро ("reboot kernel") + +Shell 0.4.4 // 20.08.2010 // Albom +======================================= +1) шелл корректно завершается при закрытии окна +2) исправлено ещё 2 ошибки +3) добавлены 2 команды: +* sleep - ждать. параметр - время в сотых частях секунды. только целое число. +* ccpuid - вывод в консоль информации (пока скудно) о процессоре. пользы мало, но давно хотел с командой cpuid разобраться (в следующем семестре буду студентам курс читать, включил разбор команды в программу). + +есть много идей. некоторые легко реализуются, некоторые сложнее. если интересно: +1) добавить переменную (одну!), в которую будет результат в текстовой форме (не то что возвращает ф-ция) записываться. с ней можно будет работать из командной строки. +2) внедрить простую стековую машину для вычислений с вещественными числами. + +Shell 0.4.3 // 20.08.2010 // Albom +======================================= +* Смесь версий 0.4.1 и 0.4.2. Теперь в архиве все исходные файлы, необходимые для компиляции (раньше использовались объектники с моими обёртками, исходники я с шеллом не выкладывал) + +Shell 0.4.2 // 28.08.2009 // diamond +======================================= +* Добавил корректное завершение работы при закрытии окна консоли, работает только начиная с последней на данный момент версией библиотеки (лежит на svn, включена в ночную сборку). Перекомпилировал в VS2008 с LTCG, ещё пошаманил с оптимизацией по размеру. + +Shell 0.4.1 // 16.03.2009 // Albom +======================================= +* версия с исправленными ошибками. +* работает команда alias, добавлена команда clear. + +Shell 0.4 // 12.08.2008 // Albom +======================================= +1) Работает схема псевдонимов (до 256 команд) +- просмотр по команде alias (без параметров) +- добавление псевдонима команды с клавиатуры или в скрипте (в том числе и .shell): alias новая команда = старая команда +- команды регистрозависимые, поэтому поклонникам ДОС придётся внести в .shell строки такого вида +alias dir = ls +alias DIR = ls +alias Dir = ls +alias DIr = ls +и т.д. +- встроенные команды переназвать невозможно, например, бессмысленна команда: +alias ls=somecommand +- при отладке получал странную информацию, но так как у меня всё работает, то пока изменений вносить не планирую + +2) Теперь шелл можно запускать с параметром (из самого себя, например). +- синтаксис: +shell команда +- пример: +shell /sys/somescript +- при этом .shell не запускается + +3) Реализована команда more. ( MEMENTO MORI! - Моментально... в море! ) +- просмотр текстовых и бинарных файлов (вроде бы задача простая, но пришлось повозиться с управляющими символами) +- очень не рекомендуется просматривать большие файлы + +Shell 0.3 // 07.08.2008 // Albom +======================================= +1) Возможность запуска скриптов. +* каждая строка должна представляет собой команду +* строкой считается набор символов, который заканчивается CR+LF (Windows) или LF(UNIX) или CR(Mac) +* если строка начинается с #, то вся строка (т.е. комментарий) игнорируется +* скрипт должен начитаться с #SHS +* при запуске шелла автоматически запускается скрипт .shell + +2) История из 5 (можно изменить при компиляции) введённых команд. +* перемещение по истории - UP/DOWN + +3) Команда alias, которая позволяет вводить синонимы для команд. +* до 256 (можно изменить при компиляции) синонимов +* пока работает только добавление и просмотр синонимов, а отработка пока не реализована. + +Shell 0.2 // 04.08.2008 // Albom +======================================= +* добавил новые функции +* написал собственную процедуру ввода команды + +Shell 0.11 // 01.08.2008 // Albom +======================================= +* Добавил команды free и reboot, внёс некоторые изменения, исправил найденные ошибки. + +Shell 0.1 // 29.07.2008 // Albom +======================================= +* Реализованы (не полностью) команды: about, cd, date, echo, exit, help, kill, ls, ps, pwd, ver +* При запуске программы (если не указан полный путь) она ищется в каталоге /rd/1 и текущем каталоге. + +Shell 0.02 // 27.07.2008 // Albom +======================================= +* Реализовал команды: + exit - выход + ls (с параметром и без) - вывод списка директории + pwd - текущий каталог + ps - список процессов и их PID + kill - завершить процесс по PID + help (с параметром и без) - помощь + +Shell 0.01 // 27.07.2008 // Albom +======================================= +* Решил написать функциональный шелл на Си с использованием console.obj. +* Пока сделал функцию отделения команды и параметров, а также реализовал команды help (пока без параметров), ver и exit. + diff --git a/programs/system/shell/all.h b/programs/system/shell/all.h index 7b91a967a..9f81ae058 100644 --- a/programs/system/shell/all.h +++ b/programs/system/shell/all.h @@ -1,6 +1,8 @@ /// =========================================================== +#include "lang.h" + #include "system/boolean.h" #include "system/kolibri.h" #include "system/stdlib.h" @@ -22,7 +24,7 @@ #include "cmd/cmd_date.c" #include "cmd/cmd_exit.c" #include "cmd/cmd_cd.c" -#include "cmd/cmd_free.c" +#include "cmd/cmd_memory.c" #include "cmd/cmd_reboot.c" #include "cmd/cmd_mkdir.c" #include "cmd/cmd_rmdir.c" @@ -33,6 +35,9 @@ #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_uptime.c" #include "modules/module_command.c" #include "modules/module_program.c" diff --git a/programs/system/shell/.shell b/programs/system/shell/bin/eng/.shell similarity index 100% rename from programs/system/shell/.shell rename to programs/system/shell/bin/eng/.shell diff --git a/programs/system/shell/bin/eng/shell.kex b/programs/system/shell/bin/eng/shell.kex new file mode 100644 index 000000000..972ca8a24 Binary files /dev/null and b/programs/system/shell/bin/eng/shell.kex differ diff --git a/programs/system/shell/bin/rus/.shell b/programs/system/shell/bin/rus/.shell new file mode 100644 index 000000000..6f527d4f0 --- /dev/null +++ b/programs/system/shell/bin/rus/.shell @@ -0,0 +1,5 @@ +#SHS + +about +echo ‚ўҐ¤ЁвҐ 'help' ¤«п бЇа ўЄЁ +echo diff --git a/programs/system/shell/bin/rus/shell.kex b/programs/system/shell/bin/rus/shell.kex new file mode 100644 index 000000000..b3528929f Binary files /dev/null and b/programs/system/shell/bin/rus/shell.kex differ diff --git a/programs/system/shell/bin/shell.kex b/programs/system/shell/bin/shell.kex deleted file mode 100644 index 07b30a48e..000000000 Binary files a/programs/system/shell/bin/shell.kex and /dev/null differ diff --git a/programs/system/shell/clean.bat b/programs/system/shell/clean.bat deleted file mode 100644 index 858f03381..000000000 --- a/programs/system/shell/clean.bat +++ /dev/null @@ -1,2 +0,0 @@ -del shell.kex -del *.o \ No newline at end of file diff --git a/programs/system/shell/cmd/cmd_about.c b/programs/system/shell/cmd/cmd_about.c index c27dd0c27..0d23ff8e9 100644 --- a/programs/system/shell/cmd/cmd_about.c +++ b/programs/system/shell/cmd/cmd_about.c @@ -2,6 +2,7 @@ int cmd_about(char param[]) { +#if LANG_ENG char message[] = { "\ \n\r\ @@ -11,6 +12,17 @@ version %s\n\r\n\r\ e-mail: albom85@yandex.ru\n\r\ site: http://albom85.narod.ru/\n\r\n\r\ "}; +#elif LANG_RUS +char message[] = { +"\ +\n\r\ +Shell ¤«п KolibriOS\n\r\ +ўҐабЁп %s\n\r\n\r\ +  ўв®а: Ђ«ҐЄб ­¤а Ѓ®Ј®¬ § aka Albom\n\r\ + e-mail: albom85@yandex.ru\n\r\ + б ©в: http://albom85.narod.ru/\n\r\n\r\ +"}; +#endif printf(message, SHELL_VERSION); return TRUE; diff --git a/programs/system/shell/cmd/cmd_cd.c b/programs/system/shell/cmd/cmd_cd.c index 8a2322f38..ff9b2bd75 100644 --- a/programs/system/shell/cmd/cmd_cd.c +++ b/programs/system/shell/cmd/cmd_cd.c @@ -7,7 +7,11 @@ unsigned result; if (NULL == dir) { - printf(" cd directory\n\r"); + #if LANG_ENG + printf(" cd \n\r"); + #elif LANG_RUS + printf(" cd <директория>\n\r"); + #endif return FALSE; } diff --git a/programs/system/shell/cmd/cmd_date.c b/programs/system/shell/cmd/cmd_date.c index 5015ce1a3..3e185127a 100644 --- a/programs/system/shell/cmd/cmd_date.c +++ b/programs/system/shell/cmd/cmd_date.c @@ -6,7 +6,11 @@ unsigned date; unsigned time; date = kol_system_date_get(); -printf(" date [dd.mm.yy]: %x%x.%x%x.%x%x", +#if LANG_ENG + printf(" Date [dd.mm.yy]: %x%x.%x%x.%x%x", +#elif LANG_RUS + printf(" „ в  [¤¤.¬¬.ЈЈ]: %x%x.%x%x.%x%x", +#endif (date&0xf00000)>>20, (date&0xf0000)>>16, // day (date&0xf000)>>12, (date&0xf00)>>8, //month (date&0xf0)>>4, (date&0xf) ); // year @@ -14,7 +18,11 @@ printf(" date [dd.mm.yy]: %x%x.%x%x.%x%x", time = kol_system_time_get(); -printf("\n\r time [hh:mm:ss]: %x%x:%x%x:%x%x\n\r", +#if LANG_ENG + printf("\n\r Time [hh:mm:ss]: %x%x:%x%x:%x%x\n\r", +#elif LANG_RUS + printf("\n\r ‚६п [зз:¬¬:бб]: %x%x:%x%x:%x%x\n\r", +#endif (time&0xf0)>>4, (time&0xf), // hours (time&0xf000)>>12, (time&0xf00)>>8, // minutes (time&0xf00000)>>20, (time&0xf0000)>>16 ); // seconds diff --git a/programs/system/shell/cmd/cmd_help.c b/programs/system/shell/cmd/cmd_help.c index 02fb18c67..12711f866 100644 --- a/programs/system/shell/cmd/cmd_help.c +++ b/programs/system/shell/cmd/cmd_help.c @@ -4,7 +4,11 @@ int cmd_help(char cmd[]) int i; -char available[]={" %d commands available:\n\r"}; +#if LANG_ENG + char available[]={" %d commands available:\n\r"}; +#elif LANG_RUS + char available[]={" Љ®«-ў® ¤®бвгЇ­ле Є®¬ ­¤: %d\n\r"}; +#endif if ( !strlen(cmd) ) { @@ -22,7 +26,11 @@ else return TRUE; } - printf (" Command \'%s\' not found.\n\r", cmd); + #if LANG_ENG + printf (" Command \'%s\' not found.\n\r", cmd); + #elif LANG_RUS + printf (" Љ®¬ ­¤  \'%s\' ­Ґ ­ ©¤Ґ­ .\n\r", cmd); + #endif printf (available, NUM_OF_CMD); for (i = 0; i < NUM_OF_CMD; i++) printf(" %s\n\r", COMMANDS[i].name); diff --git a/programs/system/shell/cmd/cmd_kerver.c b/programs/system/shell/cmd/cmd_kerver.c new file mode 100644 index 000000000..455319dc0 --- /dev/null +++ b/programs/system/shell/cmd/cmd_kerver.c @@ -0,0 +1,27 @@ +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; +} \ No newline at end of file diff --git a/programs/system/shell/cmd/cmd_kill.c b/programs/system/shell/cmd/cmd_kill.c index d54ba083e..8c326c3f7 100644 --- a/programs/system/shell/cmd/cmd_kill.c +++ b/programs/system/shell/cmd/cmd_kill.c @@ -24,7 +24,7 @@ int result; if (NULL == process) { - printf(" kill PID\n\r"); + printf(" kill \n\r"); return FALSE; } else diff --git a/programs/system/shell/cmd/cmd_memory.c b/programs/system/shell/cmd/cmd_memory.c new file mode 100644 index 000000000..d0e04500a --- /dev/null +++ b/programs/system/shell/cmd/cmd_memory.c @@ -0,0 +1,18 @@ + +int cmd_memory(char param[]) +{ +unsigned total, free, used; + +total = kol_system_mem(); +free = kol_system_memfree(); +used = total - free; + +#if LANG_ENG + printf (" Total [kB / MB / %%]: %-7d / %-5d / 100\n\r Free [kB / MB / %%]: %-7d / %-5d / %d\n\r Used [kB / MB / %%]: %-7d / %-5d / %d\n\r", +#elif LANG_RUS + printf (" ‚ᥣ® [ЉЃ / ЊЃ / %%]: %-7d / %-5d / 100\n\r ‘ў®Ў®¤­® [ЉЃ / ЊЃ / %%]: %-7d / %-5d / %d\n\r €бЇ®«м§гҐвбп [ЉЃ / ЊЃ / %%]: %-7d / %-5d / %d\n\r", +#endif + total, total/1024, free, free/1024, (free*100)/total, used, total/1024-free/1024, 100-(free*100)/total ); + +return TRUE; +} diff --git a/programs/system/shell/cmd/cmd_mkdir.c b/programs/system/shell/cmd/cmd_mkdir.c index b2d2533ee..d9ff2a1c4 100644 --- a/programs/system/shell/cmd/cmd_mkdir.c +++ b/programs/system/shell/cmd/cmd_mkdir.c @@ -8,7 +8,11 @@ unsigned result; if (NULL == dir) { - printf(" mkdir directory\n\r"); + #if LANG_ENG + printf(" mkdir \n\r"); + #elif LANG_RUS + printf(" mkdir <¤ЁаҐЄв®аЁп>\n\r"); + #endif return FALSE; } diff --git a/programs/system/shell/cmd/cmd_more.c b/programs/system/shell/cmd/cmd_more.c index 8fdee4582..2235b3e9d 100644 --- a/programs/system/shell/cmd/cmd_more.c +++ b/programs/system/shell/cmd/cmd_more.c @@ -5,13 +5,17 @@ int cmd_more(char file[]) kol_struct70 k70; kol_struct_BDVK bdvk; unsigned result, filesize, pos, i; -char buf[81]; //буфер +char buf[81]; //ЎгдҐа char temp[256]; unsigned flags; if (NULL == file) { - printf (" less filename\n\r"); + #if LANG_ENG + printf (" more \n\r"); + #elif LANG_RUS + printf (" more <Ё¬п д ©« >\n\r"); + #endif return FALSE; } @@ -41,11 +45,11 @@ k70.p16 = &bdvk; k70.p20 = 0; k70.p21 = temp; -result = kol_file_70(&k70); // получаем информацию о файле +result = kol_file_70(&k70); // Ї®«гз Ґ¬ Ё­д®а¬ жЁо ® д ©«Ґ if ( 0 != result ) return FALSE; -filesize = bdvk.p32[0]; // получаем размер файла +filesize = bdvk.p32[0]; // Ї®«гз Ґ¬ а §¬Ґа д ©«  buf[80]=0; flags = con_get_flags(); @@ -63,7 +67,7 @@ for (pos=0;pos\n\r"); + #elif LANG_RUS + printf (" rm <Ё¬п д ©« >\n\r"); + #endif return FALSE; } diff --git a/programs/system/shell/cmd/cmd_rmdir.c b/programs/system/shell/cmd/cmd_rmdir.c index ce95bd01b..a31911cf4 100644 --- a/programs/system/shell/cmd/cmd_rmdir.c +++ b/programs/system/shell/cmd/cmd_rmdir.c @@ -8,7 +8,11 @@ unsigned result; if (NULL == dir) { - printf(" rmdir directory\n\r"); + #if LANG_ENG + printf(" rmdir \n\r"); + #elif LANG_ENG + printf(" rmdir <¤ЁаҐЄв®аЁп>\n\r"); + #endif return FALSE; } diff --git a/programs/system/shell/cmd/cmd_touch.c b/programs/system/shell/cmd/cmd_touch.c index 3e0ff2b9a..23298cb00 100644 --- a/programs/system/shell/cmd/cmd_touch.c +++ b/programs/system/shell/cmd/cmd_touch.c @@ -8,7 +8,11 @@ unsigned result; if (NULL == file) { - printf(" touch filename\n\r"); + #if LANG_ENG + printf(" touch \n\r"); + #elif LANG_RUS + printf(" touch <Ё¬п д ©« >\n\r"); + #endif return FALSE; } diff --git a/programs/system/shell/cmd/cmd_turnoff.c b/programs/system/shell/cmd/cmd_turnoff.c new file mode 100644 index 000000000..cb7d07e10 --- /dev/null +++ b/programs/system/shell/cmd/cmd_turnoff.c @@ -0,0 +1,6 @@ + +int cmd_turnoff(char param[]) +{ +kol_system_end(2); +return TRUE; +} diff --git a/programs/system/shell/cmd/cmd_uptime.c b/programs/system/shell/cmd/cmd_uptime.c new file mode 100644 index 000000000..860f8af2a --- /dev/null +++ b/programs/system/shell/cmd/cmd_uptime.c @@ -0,0 +1,19 @@ + +int cmd_uptime(char param[]) +{ +unsigned time_tick, up_days, up_hours, up_minutes, up_seconds, up_millisecs; + +time_tick = kol_time_tick(); +up_days = (time_tick/(24*60*60*100)); +up_hours = (time_tick/(60*60*100))%24; +up_minutes = (time_tick/(60*100))%60; +up_seconds = (time_tick/100)%60; +up_millisecs = (time_tick*10)%100; + +#if LANG_ENG + printf (" Uptime: %d day(s), %d:%d:%d.%d\n\r", up_days, up_hours, up_minutes, up_seconds, up_millisecs); +#elif LANG_RUS + printf (" Uptime: %d ¤­Ґ©, %d:%d:%d.%d\n\r", up_days, up_hours, up_minutes, up_seconds, up_millisecs); +#endif +return TRUE; +} \ No newline at end of file diff --git a/programs/system/shell/compile.bat b/programs/system/shell/compile_eng.bat similarity index 55% rename from programs/system/shell/compile.bat rename to programs/system/shell/compile_eng.bat index ef87f155a..e845753f5 100644 --- a/programs/system/shell/compile.bat +++ b/programs/system/shell/compile_eng.bat @@ -1,3 +1,6 @@ +@echo off +erase shell.kex lang.h +echo #define LANG_ENG 1 > lang.h fasm start.asm start.o gcc -c shell.c gcc -c system/kolibri.c @@ -5,5 +8,8 @@ gcc -c system/stdlib.c gcc -c system/string.c ld -nostdlib -T kolibri.ld -o shell.kex start.o kolibri.o stdlib.o string.o shell.o objcopy shell.kex -O binary +erase lang.h start.o shell.o kolibri.o stdlib.o string.o kpack shell.kex +move shell.kex bin\eng\ +copy locale\eng\.shell bin\eng\ pause \ No newline at end of file diff --git a/programs/system/shell/compile_rus.bat b/programs/system/shell/compile_rus.bat new file mode 100644 index 000000000..652c676ff --- /dev/null +++ b/programs/system/shell/compile_rus.bat @@ -0,0 +1,15 @@ +@echo off +erase shell.kex lang.h +echo #define LANG_RUS 1 > lang.h +fasm start.asm start.o +gcc -c shell.c +gcc -c system/kolibri.c +gcc -c system/stdlib.c +gcc -c system/string.c +ld -nostdlib -T kolibri.ld -o shell.kex start.o kolibri.o stdlib.o string.o shell.o +objcopy shell.kex -O binary +erase lang.h start.o shell.o kolibri.o stdlib.o string.o +kpack shell.kex +move shell.kex bin\rus\ +copy locale\rus\.shell bin\rus\ +pause \ No newline at end of file diff --git a/programs/system/shell/globals.h b/programs/system/shell/globals.h index e5c292a66..fae15d122 100644 --- a/programs/system/shell/globals.h +++ b/programs/system/shell/globals.h @@ -1,5 +1,5 @@ -#define SHELL_VERSION "0.4.4" +#define SHELL_VERSION "0.4.5" extern char PATH[256]; extern char PARAM[256]; @@ -49,7 +49,7 @@ int cmd_clear(char arg[]); int cmd_date(char arg[]); int cmd_echo(char text[]); int cmd_exit(char arg[]); -int cmd_free(char arg[]); +int cmd_memory(char arg[]); int cmd_help(char cmd[]); int cmd_kill(char process[]); int cmd_ls(char dir[]); @@ -63,34 +63,17 @@ 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_uptime(char param[]); /// =========================================================== -const command_t COMMANDS[]= -{ - {"about", " Displays information about the program\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 directories\n\r", &cmd_cd}, - {"clear", " Clears the display\n\r", &cmd_clear}, - {"date", " Returns the date and time\n\r", &cmd_date}, - {"echo", " Echoes the data to the screen\n\r", &cmd_echo}, - {"exit", " Exits program\n\r", &cmd_exit}, - {"free", " Displays total, free and used memory\n\r", &cmd_free}, - {"help", " Gives help\n\r", &cmd_help}, - {"kill", " Stops a running process\n\r", &cmd_kill}, - {"ls", " Lists the files in a directory\n\r", &cmd_ls}, - {"mkdir", " Makes directory\n\r", &cmd_mkdir}, - {"more", " Displays a data file to the screen\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\n\r", &cmd_reboot}, - {"rm", " Removes files\n\r", &cmd_rm}, - {"rmdir", " Removes directories\n\r", &cmd_rmdir}, - {"sleep", " Stops the shell for the desired period\n\r", &cmd_sleep}, - {"touch", " Creates an empty file or updates the time/date stamp on a file\n\r", &cmd_touch}, - {"ver", " Displays version\n\r", &cmd_ver}, -}; +#if LANG_ENG + #include "locale/eng/globals.h" +#elif LANG_RUS + #include "locale/rus/globals.h" +#endif /// =========================================================== diff --git a/programs/system/shell/bin/.shell b/programs/system/shell/locale/eng/.shell similarity index 100% rename from programs/system/shell/bin/.shell rename to programs/system/shell/locale/eng/.shell diff --git a/programs/system/shell/locale/eng/globals.h b/programs/system/shell/locale/eng/globals.h new file mode 100644 index 000000000..08524e153 --- /dev/null +++ b/programs/system/shell/locale/eng/globals.h @@ -0,0 +1,28 @@ +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 \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 \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 ;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 \n\r", &cmd_kill}, + {"ls", " Lists the files in a directory. Usage:\n\r ls ;lists the files in current directory\n\r ls ;lists the files at specified folder\n\r", &cmd_ls}, + {"mkdir", " Makes directory. Usage:\n\r mkdir ;creates the folder in working directory\n\r mkdir ;create folder by specified path\n\r", &cmd_mkdir}, + {"more", " Displays a file data to the screen. Usage:\n\r more \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 \n\r", &cmd_rmdir}, + {"sleep", " Stops the shell for the desired period. Usage:\n\r sleep