• R/O
  • SSH
  • HTTPS

yash: List of commits


RSS
Rev. Time Author
r3822 2018-01-13 17:52:46 magicant

Suppress Valgrind false positives

for testing on Fedora 27.

r3821 2018-01-13 17:52:45 magicant

Quote xtrace

The trace is now printed in a format suitable for re-parsing as a simple
command that would result in the same expansion.

r3820 2018-01-13 17:52:44 magicant

Don't quote printed words too redundantly

This commit replaces the `quote_sq' function with the new
`quote_as_word` function, which does not quote if the argument is a
portable filename. It would render a better quoting results when used
for xtrace.

r3819 2018-01-13 12:39:01 magicant

Wrong function description

r3818 2017-11-11 15:32:24 magicant

doc: More on command substitution

r3817 2017-10-28 23:13:27 magicant

Version 2.46

r3816 2017-10-28 13:09:43 magicant

ja.po: Translate missing messages

r3815 2017-10-28 13:09:42 magicant

Update po files

r3814 2017-10-28 13:09:41 magicant

Up version to 2.46

r3813 2017-10-13 00:22:28 magicant

Test shell grammar rule 6

Shell grammar rule 6 requires that only the "in" and "do" reserved words
be recognized. Other reserved words like "for" are simply regarded as
normal words in this context. That means those words are subject to
alias substitution if they follow another substitution that ends with a
blank.

r3812 2017-10-09 13:04:41 magicant

Comment on failing test (#37560)

r3811 2017-10-08 15:30:57 magicant

Adjust alias limit indexes on line continuation

The shift_index function is now external as the shift_aliaslist_index
function.

r3810 2017-10-08 15:30:56 magicant

Substitute aliases anywhere in function definition

After alias substitution in which the alias value ends with a blank, the
next token is also subject to alias substitution. This POSIX requirement
applies anywhere including function definition commands. To support this
behavior (again), alias substitution function needs to be called from
many places in the function definition command parser, which is now
called after (rather than before) the simple command parser to eliminate
unneeded re-parsing and re-alias-substitution.

The is_literal_function_name function is introduced which decides if a
word is applicable for the function name used in a function definition
that does not begin with the "function" keyword. This replaces part of
the print_function_definition function, making the decision more correct
in terms of POSIXly-correctness and applicability of digits at the
beginning of the word.

r3809 2017-10-08 15:30:56 magicant

Substitute aliases in all locations

After alias substitution in which the alias value ends with a blank, the
next token is also subject to alias substitution. This POSIX requirement
applies anywhere including compound commands. To support this behavior
(again), alias substitution function needs to be called from many places
in compound command parsers.

POSIX-style function definition command does not (yet) support alias
substitution in all locations.

r3808 2017-10-08 15:30:55 magicant

Count alias name length in parser

The substitute_alias function counts the name length of the alias
candidate, but the parser also counts it before calling
substitute_alias. For optimization we can pass the length to the
substitution function.

r3807 2017-10-08 15:30:55 magicant

Consider line continuations in all alias names

This commit is basically a refactoring to extract the common pattern in
calling the alias substitution function. However, it slightly modifies
the behavior of the parser and fixes a bug where line continuations are
not being parsed as expected in recursive alias substitution.

The count_name_length function, which removes line continuations in the
way, is now called not only before the first substitution but also
before every substitution.

r3806 2017-10-08 15:30:53 magicant

Remove aliastype_T

Now that the AT_ALL flag is no longer used, the second argument to the
parse_word function can be a single Boolean.

r3805 2017-10-08 15:30:53 magicant

Flatten substitute_alias

With guard if-return statements, the substitute_alias function can be
written with less indents.

r3804 2017-10-08 15:30:52 magicant

Substitute alias recursively after blank

As a result of removing the AF_NORECUR flag, the substitute_alias
function is now called repeatedly to perform recursive alias
substitution. However, the remove_expired_aliases function was removing
all items before the current index, so non-global alias list items that
end with a blank have been already removed when substitute_alias is
called again.

To enact recursive substitution in the second call,
remove_expired_aliases should not remove such aliases.

r3803 2017-10-08 15:30:52 magicant

Remove AF_NORECUR

Results of alias substitution are subject to another substitution, but
the second substitution should apply only after the resultant words have
been confirm not to be reserved words. That means the grammatical
context for the resultant words should be examined after every
substitution. It is not correct to substitute them in direct recursion
in a single invocation of substitute_alias.

To enforce indirect recursion of alias substitution, the AF_NORECUR
option is removed from the substitute_alias function.

Callers of substitute_alias does not yet implement correct recursion
considering grammatical context.

r3802 2017-10-08 15:30:51 magicant

Simplify csubstitute_alias

Adding a new substaliasflags_T value AF_NOEOF imitate the behavior of
csubstitute_alias in substitute_alias.

r3801 2017-10-08 15:30:51 magicant

Remove aliasflags_T

The AF_BLANKEND flag has not been used. The AF_GLOBAL flag can now be
simply replaced with Boolean.

r3800 2017-10-08 15:30:50 magicant

Remove unused clone_aliaslist

r3799 2017-10-08 15:30:49 magicant

Substitute alias recursively after another (#37543)

r3798 2017-10-08 15:30:49 magicant

Return last limit index from remove_expired_aliases

The new return value is not (yet) used.
This refactoring is preparation for an upcoming bug fix.

r3797 2017-10-08 15:30:48 magicant

Clean up code

r3796 2017-07-23 14:01:29 magicant

Suppress Clang warning

r3795 2017-07-23 14:01:29 magicant

Suppress GCC warnings

r3794 2017-07-23 14:01:28 magicant

Compare pointer with NULL, not with wchar_t

r3793 2017-07-23 00:22:58 magicant

Parse and execute line-wise with input_wcs (#37360)

Show on old repository browser