Shell 0.7.3. Bug with '%' symbol in command history is fixed.

git-svn-id: svn://kolibrios.org@4309 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Albom 2013-11-28 19:08:52 +00:00
parent e07b6d7a9a
commit 3b43ee8e60
3 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
Shell 0.7.3 // 28.11.2013 // Albom
* ˆá¯à ¢«¥­  ®è¨¡ª  á ᨬ¢®«®¬ % ¢ ¨áâ®à¨¨ ª®¬ ­¤
Shell 0.7.2 // 26.10.2013 // Albom Shell 0.7.2 // 26.10.2013 // Albom
* ” ©« .shell ¯¥à¥­¥á¥­ ¢ /sys/settings/ * ” ©« .shell ¯¥à¥­¥á¥­ ¢ /sys/settings/
* ˆá¯à ¢«¥­  ª®¬ ­¤  "cd .." * ˆá¯à ¢«¥­  ª®¬ ­¤  "cd .."

View File

@ -1,5 +1,5 @@
#define SHELL_VERSION "0.7.2" #define SHELL_VERSION "0.7.3"
extern char PATH[256]; extern char PATH[256];
extern char PARAM[256]; extern char PARAM[256];

View File

@ -64,7 +64,7 @@ for (;;)
if (cmdPos > 0) if (cmdPos > 0)
{ {
for (i = cmdPos-1; i < cmdLen; i++) for (i = cmdPos-1; i < cmdLen; i++)
CMD[i] = CMD[i+1]; CMD[i] = CMD[i+1];
for (i = 0; i < cmdLen-cmdPos; i++) for (i = 0; i < cmdLen-cmdPos; i++)
printf (" "); printf (" ");
@ -178,7 +178,7 @@ for (;;)
else else
CMD_NUM = 0; CMD_NUM = 0;
printf( CMD_HISTORY[CMD_NUM] ); printf( "%s", CMD_HISTORY[CMD_NUM] );
strcpy(CMD, CMD_HISTORY[CMD_NUM]); strcpy(CMD, CMD_HISTORY[CMD_NUM]);
cmdLen = strlen(CMD); cmdLen = strlen(CMD);
cmdPos = strlen(CMD); cmdPos = strlen(CMD);
@ -203,7 +203,7 @@ for (;;)
else else
CMD_NUM = CMD_HISTORY_NUM_REAL-1; CMD_NUM = CMD_HISTORY_NUM_REAL-1;
printf( CMD_HISTORY[CMD_NUM] ); printf( "%s", CMD_HISTORY[CMD_NUM] );
strcpy(CMD, CMD_HISTORY[CMD_NUM]); strcpy(CMD, CMD_HISTORY[CMD_NUM]);
cmdLen = strlen(CMD); cmdLen = strlen(CMD);
cmdPos = strlen(CMD); cmdPos = strlen(CMD);