Skip to content

Commit e5a1a9f

Browse files
committed
Merge pull request #357 from grissiom/enhance-finsh
finsh: allow user to disable the FINSH_USING_HISTORY
2 parents 3304a41 + 3d58426 commit e5a1a9f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

components/finsh/shell.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,17 @@
3333
#include <rtthread.h>
3434
#include "finsh.h"
3535

36-
#define FINSH_USING_HISTORY
36+
/* For historical reasons, users don't define FINSH_USING_HISTORY in rtconfig.h
37+
* but expect the history feature. So you sould define FINSH_USING_HISTORY to 0
38+
* to disable it from the rtconfig.h. */
39+
#ifdef FINSH_USING_HISTORY
40+
# if FINSH_USING_HISTORY == 0
41+
# undef FINSH_USING_HISTORY
42+
# endif
43+
#else
44+
# define FINSH_USING_HISTORY
45+
#endif
46+
3747
#ifndef FINSH_THREAD_PRIORITY
3848
#define FINSH_THREAD_PRIORITY 20
3949
#endif

0 commit comments

Comments
 (0)