mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 02:57:52 +08:00
Update more examples to reference new slice syntax.
This commit is contained in:
parent
a7934a6810
commit
ceda0d052b
|
@ -731,14 +731,14 @@ Julia.)
|
|||
|
||||
## Map indexing
|
||||
|
||||
Maps are simply indexed by their keys. There is no slice indexing, and `..` or
|
||||
`..=` does not have a special meaning. Examples:
|
||||
Maps are simply indexed by their keys. There is no slice indexing, and `..` and
|
||||
`..=` do not have a special meaning. Examples:
|
||||
|
||||
```elvish-transcript
|
||||
~> map = [&a=lorem &b=ipsum &a:b=haha]
|
||||
~> map = [&a=lorem &b=ipsum &a..b=haha]
|
||||
~> echo $map[a]
|
||||
lorem
|
||||
~> echo $map[a:b]
|
||||
~> echo $map[a..b]
|
||||
haha
|
||||
```
|
||||
|
||||
|
@ -757,7 +757,7 @@ Examples:
|
|||
▶ lorem
|
||||
▶ foo
|
||||
▶ [lorem ipsum]
|
||||
~> put [&a=lorem &b=ipsum &a:b=haha][a a:b]
|
||||
~> put [&a=lorem &b=ipsum &a..b=haha][a a..b]
|
||||
▶ lorem
|
||||
▶ haha
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user