In mksh, ksh93, zsh and maybe others, you can use quotes to suppress alias
expansions during definition just like you would a simple command;
unfortunately bash deems it a invalid identifier.
When using an pattern that begin with an period in pattern-list, bash will
include dotfiles in the results.
This doesn't seem to be the case with the various korn shells that i have seen.
Since extglob is based on
ksh's extension to globbing, this appears to be an bug.
$ shopt -s extglob;
On 12/31/2017 01:47 PM, Chet Ramey wrote:
> On 12/29/17 6:55 PM, Eric Cook wrote:
>> When using an pattern that begin with an period in pattern-list, bash will
>> include dotfiles in the results.
>> This doesn't seem to be the case with the various korn shells that i have
&
On 01/02/2018 10:30 AM, Chet Ramey wrote:
> On 12/31/17 10:36 PM, Eric Cook wrote:
>
>> So to make my request more specific, i don't think the extglob !() should
>> match dotfiles when one of the patterns in the list is preceded with an
>> period.
>> to be more ks
On 04/11/2018 10:57 AM, Chet Ramey wrote:
> Yep, that's an incompatibility. The `c.c' thing in the original report is
> just a red herring, though.
>
> Chet
>
If you are aiming for compatibility with zsh, the fact that `echo **' recurses
is also a bug.
On 8/16/20 11:47 AM, Todd A. Jacobs wrote:
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: darwin19.5.0
Compiler: clang
Compilation CFLAGS: -DSSH_SOURCE_BASHRC -Wno-parentheses -Wno-format-security
uname output: Darwin titan.local 19.6.0 Darwin Kernel
On 3/28/21 7:02 AM, Oğuz wrote:
As it should be. `[bar]' doesn't qualify as an assignment without an equals
sign, the shell thinks you're mixing two forms of associative array assignment
there.
In the new form, that a key is listed inside a compound assignment alone
implies that it was meant
On 3/29/21 5:18 PM, Chet Ramey wrote:
If you look at
a=( k1 v1 k2 v2 k3 v3)
as more or less syntactic sugar for
a=( [k1]=v1 [k2]=v2 [k3]=v3 )
it's reasonable that
a=( k1 v1 k2 )
is equivalent to
a=( [k1]=v1 [k2]= ). And that's what bash does.
Its just when populating that array
On 3/30/21 10:54 AM, Chet Ramey wrote:
> On 3/29/21 6:40 PM, Eric Cook wrote:
>> Its just when populating that array dynamically with another array
>> if that second array didn't contain `v1' hypothetically, the array gets
>> shifted to
>
> OK, how would you do that? W
On 3/30/21 3:44 PM, Chet Ramey wrote:
Is this a serious piece of code, or just one to demonstrate a programming
error?
The latter
There is only one field, terminated by `|', which becomes one array
element. This is where you `lose' the null elements, not when you attempt
to copy. Nothing you
Hey,
When doing an assignment with an uneven number of elements bash currently
silently treat the last element
as a key and assigns it an empty string.
$ typeset -A ary=(this feature came from zsh); typeset -p ary
declare -A ary=([came]="from" [this]="feature" [zsh]="" )
In zsh this is an
On 3/28/21 12:25 AM, Oğuz wrote:
Why? I think it's better this way.
--
Oğuz
1) For consistency sake with the shell the idea was borrowed from mostly.
2) Prior to this extension bash required specifying the key and value for
AA assignments, so it seems weird to silently ignore that a value
12 matches
Mail list logo