4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-15 14:39:24 +08:00

100 Commits

Author SHA1 Message Date
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
8bd3e6f6dc [Kernel] Change command line to const parameter and add system() function. 2014-04-02 14:05:15 +08:00
Grissiom
0979328fb1 [msh] don't complain on empty command
Just branch out and no complain on command length == 0;
2014-03-29 11:33:20 +08:00
Grissiom
c44f32e513 [msh] cd to path when possible
When DFS_USING_WORKDIR is enabled, msh will try to chdir if the command
is not found. For example, if there is folder named "SD", and there is
no `SD` command and `SD.mo` module, typing "SD" in msh will cd to the
folder.

In more detail, the execution order right now is:

1. built-in command
2. module
3. cd to path

If you have a folder named "ps", you have to run `cd ps` to change the
working dir.
2014-03-27 16:41:26 +08:00
Grissiom
f9659283c0 [msh] try to complete module path
Msh can execute module directly. So try to auto-complete the path when
user press TAB. There is a chance that the path is a module.
2014-03-27 15:09:53 +08:00
bernard
04b5a46179 [Finsh] fix the shell prompt issue. 2014-03-12 16:25:59 +08:00
bernard
444b928d22 Add more command to msh for module. 2014-03-12 08:47:10 +08:00
bernard
33a5abbbf8 [Finsh] Use msh as prompt when current mode is msh mode. 2014-03-11 15:54:21 +08:00
bernard
32a6f5b730 [Finsh] remove the .mo display when command is not found. 2014-02-15 10:28:38 +08:00
bernard
8778e39c9f [Finsh] Add ifconfig command implementation. 2014-02-01 21:35:46 +08:00
bernard
ae891e2011 [Finsh] fix strncmp issue in command search 2014-01-16 22:22:23 +08:00
roamboy
1c8693c87e Update msh.c 2014-01-13 15:57:13 +08:00
roamboy
1df4c1b962 Update msh.c 2014-01-13 15:56:20 +08:00
roamboy
849130da2c Update msh.c
fix msh_exec(char* cmd, rt_size_t length) bug
2014-01-13 15:52:23 +08:00
bernard
31446eab4c [Kernel] application module can support arguments 2014-01-11 16:33:31 +08:00
Bernard Xiong
abdcd80dcd [Finsh] Add more command in msh 2014-01-05 14:57:58 +08:00
bernard
6a624356e4 [Finsh] code cleanup 2014-01-04 06:02:33 +08:00
bernard
1f8a0668d2 [Finsh] Add features to execute module. 2014-01-03 08:01:24 +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
bernard
1ffb99e6f5 Merge branch 'master' of https://github.com/RT-Thread/rt-thread 2013-10-10 00:22:59 +09:00
bernard
6c5e34fa70 fix the line too long issue 2013-10-09 18:06:40 +09:00
Grissiom
df4e8ff060 msh: only export cd/pwd when DFS_USING_WORKDIR is set 2013-09-26 11:50:28 +08:00
Grissiom
6d2df9bf94 finsh: unregister rx_indicate when closing the device
Because the device could still remain opened when closed by finsh, the
old rx_indicate is useless for finsh. Some buggy driver will still
generate rx_indicate even after the device has been closed. So FinSh
should unregister the rx_indicate when releasing the old device.
2013-09-22 22:12:04 +08:00
Grissiom
c05b205390 finsh: use alias in the variable definition
With this patch, one could define two alias for the same function like:

    FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, reboot, reboot the cpu);
    FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, __cmd_reboot, reboot the cpu);

Suitable for being used in MSH/Finsh.
2013-08-31 17:58:34 +08:00
Grissiom
b4ab82284f finsh/cmd: add description for new pipe and portal device 2013-08-20 14:27:28 +08:00
bernard
fa934fa7bd add shell device automatically setting for rx_ind 2013-08-19 12:46:04 +08:00
Bernard Xiong
f0f0e3dd9e move commands out of DFS 2013-07-14 14:36:48 +08:00
Bernard Xiong
b0c1f8a79b Add device checking when set_device. 2013-07-05 21:02:47 +08:00
Bernard Xiong
98c8a23e94 Add component initialization. 2013-06-23 07:48:42 +08:00
Bernard Xiong
d80a471680 Fix the memheap_realloc issue 2013-06-03 06:44:35 +08:00
Grissiom
27ee5b627b finsh: add CCS support 2013-05-29 23:37:43 +08:00
user
06c6630bbf fix compiling warning in finsh shell 2013-04-04 14:12:35 -04:00
Bernard Xiong
009eccf640 fix the wrong strcpy issue in list() function 2013-04-04 15:32:10 +08:00
Bernard Xiong
b68e34c931 strip more characters in finsh token 2013-04-03 05:31:29 -04:00
Bernard Xiong
97eadb7d8e implement a shell for module 2013-03-30 16:14:38 +08:00
prife
5d68ef8ec1 fix bug in finsh when built with 64bit-gcc 2013-01-22 12:44:47 +08:00
Ming, Bai
b4de7cce57 Re-normalizing the repo 2013-01-08 22:40:58 +08:00
dzzxzz@gmail.com
6e6d5c5b0d fixed the coding style
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2572 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-31 05:33:46 +00:00
bernard.xiong@gmail.com
9a8fbc6f17 fix some compiling warning.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2571 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-31 04:17:31 +00:00
rogerz.zhang@gmail.com
d573786d52 fix memory access error in list_tc() under bsp/simulator
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2550 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-29 08:11:38 +00:00
bernard.xiong@gmail.com
c84d99706f fix some compiling warning.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2543 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-29 04:12:14 +00:00
bernard.xiong@gmail.com
9a52205a5e Add min_length initialization.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2537 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-28 08:49:15 +00:00
bernard.xiong@gmail.com
ee2344c582 remove the unnecessary "#pragma pack(pop)"
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2409 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-11-13 13:39:47 +00:00
bernard.xiong@gmail.com
42a59720a9 Add more checking for _MSC_VER compiler.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2394 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-11-05 07:01:49 +00:00
bernard.xiong@gmail.com
1c425607c3 fixed mutex issue in memheap; fixed compiling issue in kservice.c when COMPILER is not defined; add finsh for win32 porting.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2365 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-10-22 03:12:21 +00:00
bernard.xiong@gmail.com
5e1f1268a1 Includes finsh.h header file.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2335 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-10-10 04:02:36 +00:00