misonyo
14e048aa8e
[components/shell] shell will not work if ch is none zero as random value in stack
...
The serial getchar will only modify the LSB of ch, the MSB 3 bytes
will be unchanged as the random value on stack, so if MSB 3 bytes
not zero, the value got is wrong.
2019-03-13 22:05:03 +08:00
gbcwbz
860f8d954d
[finsh] change return type of finsh_getchar from ch to int
...
finsh_getchar invokes getchar, who's return type is int, and return value may < 0, which means error occurred or EOF.
finsh should handle that situation properly, and inform user about the error.
2019-03-10 15:50:03 +08:00
chenchaoqun@rt-thread.com
931cdb1f6f
[finsh/shell] compatible definition for cube package
2018-11-07 14:31:32 +08:00
Bernard Xiong
9064b28c2a
[license] Change license to Apache.
2018-10-14 19:28:18 +08:00
Bernard Xiong
b98a0ba804
[Kernel] Add ARMCC 6.x support.
2018-09-23 12:08:44 +08:00
armink
4c92650fde
[components][finsh] Fix shell re-initialization check code to supported C89.
2018-07-17 12:52:02 +08:00
Bernard Xiong
39998e4d89
Merge pull request #1602 from aozima/re_initial_dev
...
add re-initial check.
2018-07-04 07:15:45 +08:00
aozima
efada8768e
[shell] set prompt mode is default enable.
2018-07-02 19:46:37 +08:00
aozima
4f1112f838
[shell] add finsh_set_prompt().
2018-07-02 16:23:00 +08:00
aozima
85e732ddaf
[shell] add finsh_get/set_prompt_mode.
2018-07-02 15:12:17 +08:00
aozima
e49a29f2dc
[shell] add re-initial check.
2018-07-02 09:56:12 +08:00
armink
72ec60aaa3
[components][finsh] Finsh thread using heap when RT_USING_HEAP is defined.
2018-04-23 13:28:44 +08:00
moebius.ever
61946325ee
[finsh] add FINSH_ECHO_DISABLE_DEFAULT and remove FINSH_ECHO_MODE_DEFAULT, to control the finsh default echo mode
2018-03-16 16:26:22 +08:00
moebius.ever
48ecbd3999
[finsh] add FINSH_ECHO_MODE_DEFAULT, to config the default echo mode of finsh
2018-03-15 12:13:40 +08:00
moebius.ever
5444c90ecf
[finsh] add FINSH_ENABLE_ECHO macro to config the finsh needs echo or not
2018-03-15 10:12:17 +08:00
Bernard Xiong
f9a7ba050a
[finsh] convert tab to space and split export API to finsh_api.h
2018-03-01 21:01:20 +08:00
armink
013e5bd411
[Components][Finsh] Add shell getchar received error process.
2018-02-23 15:24:27 +08:00
armink
cfd82c260d
[Finsh] Add finsh thread name macro.
2018-01-12 17:22:14 +08:00
armink
82b7ecda06
[Finsh] Fix an auto complete history bug when current line is contained in last cmd.
2017-11-01 10:25:17 +08:00
bernard
8a38307e2c
[libc] Add RT_USING_POSIX macro.
...
1. Add macro check in rtdebug.h;
2. Use RT_USING_POSIX for poll/select, stdin etc.
3. Split dfs_posix.h to dfs_posix.h, dfs_poll.h and dfs_select.h;
2017-10-17 22:27:06 +08:00
bernard
3c0fbf0c7e
[finsh] Fix the C99 issue.
2017-10-17 09:45:17 +08:00
bernard
444915d1ea
[finsh] Add RT_USING_POSIX_STDIN options.
2017-10-13 11:50:18 +08:00
armink
c123451585
[Finsh] Stop push new history when current cmd is same as last cmd.
2017-10-13 10:21:40 +08:00
bernard
95ab8c02aa
[finsh] Use standard uint type for data type.
...
Use uint8_t/uint32_t etc to replace u_char/u_long etc;
Use getchar for shell input.
2017-10-10 14:27:34 +08:00
armink
c36a628ff4
[Finsh] Fix finsh password auth not valid when RT_DEBUG is not definition.
2017-08-30 20:42:36 +08:00
armink
72e4efb46e
[finsh]Improve the set password.
2016-11-26 16:45:54 +08:00
armink
8ff7529039
[finsh] Add password authentication. Increased input security.
2016-11-26 15:23:12 +08:00
Bernard Xiong
f0fc48922b
[finsh] use the macro definition instead of the const number in the code
2016-03-01 10:56:46 +08:00
SchumyHao
f1e92c63f2
finsh: check echo_mode before print '\n' when excute msh command
...
Signed-off-by: SchumyHao <bob-hjl@126.com>
2015-11-13 00:56:50 +08:00
Bernard Xiong
c2b5cd1e85
[Finsh] fix the '\r' issue in linux telnet.
2015-10-12 10:52:14 +08:00
Bernard Xiong
353f511cb0
[finsh] fix the '\0' issue when use shell in linux telnet
2015-09-24 03:06:26 +00:00
ardafu
084a8dcd0c
[finsh] Clear buffer before switching to new shell device
2015-05-22 16:35:01 +08:00
Bernard Xiong
570e2ffbe7
[finsh] Fix the echo mode issue.
2015-02-23 11:36:48 +08:00
Grissiom
099ada6699
finsh: open the finsh device with RT_DEVICE_FLAG_STREAM
2015-01-04 19:42:58 +08:00
limxuzheng
4fea46c83c
support rx62n
2014-11-12 01:09:43 +08:00
bernard
3b5c2e2f9f
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
2014-09-11 12:55:18 +08:00
bernard
a8b0fe3f36
[shell] Fix compiling issue when DFS is not enable
2014-09-11 12:47:25 +08:00
weety
12136cfeb1
[finsh] fixed finsh issue.
2014-08-26 23:36:16 +08:00
bernard
02faf9edb8
[Finsh] fix device_open issue when set_device in finsh.
2014-07-20 13:57:49 +08:00
bernard
c45f5a2490
[Drivers] re-write serial framework.
2014-07-18 06:45:54 +08:00
bernard
f44f6caadb
[Finsh] Fix command line size issue in finsh.
2014-07-10 13:35:28 +08:00
Grissiom
841898abe2
[shell] define FINSH_PROMPT as finsh_get_prompt when FINSH_USING_MSH enabled
...
When MSH enabled, the prompt will change at the two shells. So we should
use dynamic prompt when FINSH_USING_MSH defined.
2014-04-08 15:12:44 +08:00
bernard
04b5a46179
[Finsh] fix the shell prompt issue.
2014-03-12 16:25:59 +08:00
bernard
33a5abbbf8
[Finsh] Use msh as prompt when current mode is msh mode.
2014-03-11 15:54:21 +08:00
bernard
6a624356e4
[Finsh] code cleanup
2014-01-04 06:02:33 +08:00
bernard
8a56e181bd
[Finsh] cleanup the code style
2014-01-03 07:15:25 +08:00
bernard
b924104129
Add FINSH_USING_MSH_ONLY option
2014-01-01 23:14:45 +08:00
bernard
a5ba2a24f7
add file and path name auto completion for module shell
2014-01-01 21:45:09 +08:00
prife
b79b9be19f
finsh: fix finsh device setting
...
1. rt_console_get_device should be call to set shell device only when it is null, or it will make finsh_set_device useless.
2. RT_USING_CONSOLE can be disabled in bsp/rtconfig.h
2013-11-18 21:17:49 +08:00
Grissiom
1e01252824
finsh: refactor the control key handling
...
We split the history handling form the key handling. So we could handle
the direction key even if the history is disabled. As a "side effect", I
also remove the unnecessary "use_history" bit.
2013-10-18 22:36:51 +08:00