#include "../shell/cmdedit.h"
+
#ifdef CONFIG_LOCALE_SUPPORT
#define Isprint(c) isprint((c))
#else
#endif
#ifdef CONFIG_FEATURE_GETUSERNAME_AND_HOMEDIR
-# ifndef TEST
-# include "pwd_.h"
-# else
-# include <pwd.h>
-# endif /* TEST */
+#include "pwd_.h"
#endif /* advanced FEATURES */
if (safe_read(0, &c, 1) < 1)
goto prepare_to_die;
}
+ if (c >= '1' && c <= '9') {
+ unsigned char dummy;
+
+ if (safe_read(0, &dummy, 1) < 1)
+ goto prepare_to_die;
+ if(dummy != '~')
+ c = 0;
+ }
switch (c) {
#ifdef CONFIG_FEATURE_COMMAND_TAB_COMPLETION
case '\t': /* Alt-Tab */
input_end();
break;
default:
- if (!(c >= '1' && c <= '9'))
- c = 0;
+ c = 0;
beep();
}
- if (c >= '1' && c <= '9')
- do
- if (safe_read(0, &c, 1) < 1)
- goto prepare_to_die;
- while (c != '~');
break;
}