Age | Commit message (Collapse) | Author |
|
function old new delta
parse_and_put_prompt 755 774 +19
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
unicode_strlen - 31 +31
read_line_input 3876 3879 +3
lineedit_read_key 255 246 -9
parse_and_put_prompt 785 755 -30
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/2 up/down: 34/-39) Total: -5 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
show_history - 39 +39
builtin_history - 16 +16
historycmd - 13 +13
bltins1 312 324 +12
builtintab 336 344 +8
popstring 134 140 +6
hush_main 1048 1046 -2
ash_main 1398 1396 -2
size_from_HISTFILESIZE 44 40 -4
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 3/3 up/down: 94/-8) Total: 86 bytes
Signed-off-by: Flemming Madsen <busybox@themadsens.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
parse_and_put_prompt 793 785 -8
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
parse_and_put_prompt 742 793 +51
read_line_input 3836 3826 -10
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Based on the patch by Arnaud RĂ©billout <rebillout@syscom.ch>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
In vi mode, the 'p' and 'P' commands caused a segfault when nothing had
been put in the buffer yet because the delptr was not initialized.
Signed-off-by: Shawn J. Goff <shawn7400@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Cliff Frey <cliff@meraki.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
When CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is set to y, the histfile
will get cleared if the total amount of history lines is less than MAX_HISTORY.
Only if the histfile is not empty _and_ the amount of lines currently
in memory are equal to or greater than MAX_HISTORY, history saving will
work as expected with this feature enabled.
Output from defconfig + CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y:
$ echo "foo" > ~/.ash_history
$ ./busybox ash
~/busybox/a $ echo "bar" > /dev/null
~/busybox/a $ exit
$ cat ~/.ash_history
$
Output with the patch applied and same config as above:
$ echo "foo" > ~/.ash_history
$ ./busybox ash
~/busybox/b $ echo "bar" > /dev/null
~/busybox/b $ exit
$ cat ~/.ash_history
foo
echo "bar" > /dev/null
exit
$
Signed-off-by: Dennis Groenen <tj.groenen at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
First change fixes "read -n NUM". Apparently poll() won't report
data availability if cc[VMIN] > 1 until there are at least cc[VMIN] bytes.
function old new delta
read_line_input 3885 3877 -8
shell_builtin_read 1097 1087 -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18) Total: -18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
ctrl_left - 96 +96
ctrl_right - 76 +76
static.esccmds 81 93 +12
read_line_input 3876 3885 +9
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 193/0) Total: 193 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Based on the patch by Dennis Groenen <tj.groenen@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
read_line_input 3433 3957 +524
load_string 77 90 +13
input_tab 1086 1069 -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 537/-17) Total: 520 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Based on patch from Alexey Fomenko (ext-alexey.fomenko AT nokia.com)
function old new delta
size_from_HISTFILESIZE - 44 +44
hush_main 998 1025 +27
ash_main 1348 1374 +26
read_line_input 3361 3372 +11
new_line_input_t 17 24 +7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
load_string 45 91 +46
save_string 40 82 +42
reinit_unicode 34 61 +27
BB_PUTCHAR 97 120 +23
init_unicode 17 37 +20
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 158/0) Total: 158 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
pgetc 420 500 +80
readtoken1 3202 3239 +37
read_line_input 3316 3337 +21
udhcpc_main 2610 2630 +20
file_get 266 272 +6
expandarg 958 963 +5
localcmd 257 259 +2
addLines 85 87 +2
read_line 94 95 +1
ed_main 2540 2541 +1
timed_out 1 - -1
lineedit_read_key 256 255 -1
alrm_sighandler 44 - -44
cmdloop 539 434 -105
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 10/2 up/down: 175/-151) Total: 24 bytes
text data bss dec hex filename
887379 936 17200 905515 dd12b busybox_old
887411 936 17192 905539 dd143 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Using ash in busybox git version dea28e1e, tab completion doesn't seem
to work properly for filenames that have special characters (such as
spaces) in them. For example, with filenames "foo bar" and "foo zap",
typing "ls fo<TAB>" correctly expands to "ls foo\ ", but then
continuing to type "b<TAB>" will produce "ls foo\ bbar", which is not
correct (the 'b' is duplicated).
Signed-off-by: Mike Shal <marfey@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
While at it, make ESC sequences more readable; and removed check for
isatty(stdin) in reset. Code shrink:
text data bss dec hex filename
884771 936 17216 902923 dc70b busybox_old
884723 936 17216 902875 dc6db busybox_unstripped
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
function old new delta
complete_cmd_dir_file 731 730 -1
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
function old new delta
input_tab 1027 1041 +14
build_match_prefix 590 562 -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 14/-28) Total: -14 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
function old new delta
input_tab 1016 1012 -4
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Now it is allocated temporarily only for the duretion of prefix generation,
and also we only allocate the needed size, not maximally possible.
function old new delta
build_match_prefix 579 590 +11
remove_chunk 43 28 -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 11/-15) Total: -4 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
pos_buf is a strange hack, easy to do without it.
This also allows lines >32k long to be handled.
Also simplified match prefix generations and made behavior more like bash.
function old new delta
remove_chunk - 43 +43
collapse_pos 79 - -79
build_match_prefix 804 579 -225
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/1 up/down: 43/-304) Total: -261 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
This kills horrific logic which deletes and re-adds prefix (!)
function old new delta
complete_cmd_dir_file 705 731 +26
complete_username 121 124 +3
input_tab 1041 1016 -25
build_match_prefix 838 804 -34
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 29/-59) Total: -30 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Noted bugs in behavior.
Added debugging machinery.
Decoupled variables reused for unrelated purposes: apparently,
when not forced to use liveness analysis, gcc fares better.
function old new delta
complete_cmd_dir_file 699 705 +6
collapse_pos 75 79 +4
build_match_prefix 892 838 -54
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 10/-54) Total: -44 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
renames and deinlines a few functions
function old new delta
input_tab - 1041 +1041
complete_cmd_dir_file - 699 +699
complete_username - 121 +121
username_completion 121 - -121
read_line_input 5002 3313 -1689
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 0/1 up/down: 1861/-1810) Total: 51 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
function old new delta
read_line_input 4966 5002 +36
bb_wcstombs 170 159 -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 36/-11) Total: 25 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Some logic changes and function renames. The fix will follow this patch,
to mkae it distinct from cleanup.
function old new delta
build_match_prefix - 892 +892
username_completion - 121 +121
read_line_input 4902 4966 +64
username_tab_completion 235 - -235
find_match 892 - -892
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 1/0 up/down: 1077/-1127) Total: -50 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
unicode_strwidth - 20 +20
read_line_input 4945 4953 +8
unicode_strlen 31 - -31
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/0 up/down: 28/-31) Total: -3 bytes
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
input_backward 212 229 +17
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
input_backward 212 208 -4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
bell 2 - -2
CMdown 2 - -2
Ceos 4 - -4
Ceol 4 - -4
CMup 4 - -4
SOs 5 - -5
SOn 5 - -5
CMrc 9 - -9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|