• R/O
  • SSH
  • HTTPS

yash: List of commits


RSS
修訂. 時間 作者
r4102 2020-10-04 22:45:13 magicant

Correct escaping in quote removal in double bracket command

Unescaping the result of quote_removal(..., ES_QUOTED_HARD) is not the
same as quote_removal(..., ES_NONE).

r4101 2020-10-04 22:45:13 magicant

Correct escaping in quote removal in expand_single_with_glob

Unescaping the result of quote_removal(..., ES_QUOTED_HARD) is not the
same as quote_removal(..., ES_NONE).

r4100 2020-10-04 22:45:12 magicant

Correct escaping in quote removal in globbing

Unescaping the result of quote_removal(..., ES_QUOTED_HARD) is not the
same as quote_removal(..., ES_NONE).

r4099 2020-10-04 22:45:11 magicant

No empty field removal in expand_word

This affects the result of "${{@}}" where $# = 0.

r4098 2020-10-04 22:45:11 magicant

Remove fixed parameter from expand_single_with_glob

r4097 2020-10-04 22:45:10 magicant

Remove fixed parameters from expand_word

r4096 2020-10-04 22:45:10 magicant

Use expand_single_cc in expand_single

r4095 2020-10-04 22:45:09 magicant

The expand_single_cc function

r4094 2020-10-04 16:10:49 magicant

Don't read after terminating null in expand_four

This bug was introduced in c4046.

r4093 2020-09-29 00:21:00 magicant

Allow expanding "$@""$@" to nothing (#40719)

When there are no positional parameters, "$@" should expand to zero
fields. Two times zero fields should be zero fields.

This commit modifies many parts of word expansion algorithm. The most
important change is in the way the double-quotes are removed after the
expansion of $@. In the previous implementation, the double-quotes were
removed in empty field removal, which is done after field splitting.
That behavior more closely resembled the order of expansion steps as
defined in POSIX, but it removed only one pair of double-quotes.

To remove correct number of double-quotes, we now remove them in the
expand_four function, just when expand_param returns zero fields.

To count the number of expanded fields returned from expand_param in
expand_four, expand_param now needs to return the expanded fields
directly. In doing so, the expand_four_T structure is simplified, the
expand_four_inner_T structure is removed, and the expand_four and
expand_param functions return expand_four_T as a return value instead of
an output parameter.

r4092 2020-09-29 00:20:59 magicant

More tests on expansion of $* and $@

r4091 2020-09-29 00:20:58 magicant

Abort immediately on expansion error

Many other shells behave this way.

r4090 2020-09-26 23:19:33 magicant

Use pl_truncate instead of pl_clear where possible

pl_truncate is an inline function. It should be faster.

r4089 2020-09-26 16:59:59 magicant

Faster field splitting

- Merge the `fieldsplit_all' and `fieldsplit` functions so that the
`fields' list is not allocated for each input string.
- Directly add the input string to the result list if the result string
is the same as the input.

r4088 2020-09-26 16:59:58 magicant

Amend: Faster brace expansion (#40708)

- Documentation for the `try_expand_brace_sequence' function
- Memory leak in the `try_expand_brace_sequence' function

r4087 2020-09-26 12:23:47 magicant

Faster brace expansion (#40708)

Previously, the time complexity of the brace expansion algorithm for an
input string of the form "{{{{{{...{{{" was O(n^2) where n is the length
of the input string. It was because, for each '{', the algorithm tries
to search all the remaining characters for a matching '}'.

In the new algorithm, we first scan the entire input string in O(n) time
and then generates the final results using the scan result. It should
work faster in case the expansion results in the same string as the
input.

r4086 2020-09-26 12:23:47 magicant

The pl_truncate function

The pl_remove function is not so fast because it internally uses
memmove. Removing last elements can be done more quickly.

r4085 2020-09-26 12:23:46 magicant

More test on complex brace expansion

r4084 2020-09-24 22:12:40 magicant

Cleanup: Remove defaultcc from expand_four

The parameter is always CC_LITERAL, so the value can be hard-coded.

r4083 2020-09-24 21:50:15 magicant

Quoting inside parameter expansion inside double-quotes (#40751)

r4082 2020-09-24 21:50:13 magicant

More tests on quoting in expansions

r4081 2020-09-24 14:18:23 magicant

Correct quote removal in arithmetic expansion (#40738)

r4080 2020-09-21 12:29:05 magicant

Extract common code from print_scalar & print_array

r4079 2020-09-20 22:08:59 magicant

Less memory allocation

r4078 2020-09-20 21:50:30 magicant

wglob: Remove duplicates in linear time complexity

The previous algorithm had square time complexity

r4077 2020-09-20 21:50:30 magicant

Test extended glob **/**

r4076 2020-09-20 16:19:41 magicant

sb_initwithmax and wb_initwithmax

r4075 2020-09-20 16:19:40 magicant

Cleanup

r4074 2020-09-20 12:52:05 magicant

Delete branch charcategory

r4073 2020-09-20 12:51:34 magicant

Merge branch charcategory (#39288)

https://github.com/magicant/yash/pull/8

Show on old repository browser