mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Add comment in manual about array base index
darcs-hash:20060211001546-ac50b-cebbcd5ca6709c8370433abf366c0aa318ec48ec.gz
This commit is contained in:
parent
20c83ba605
commit
5718ea41df
1 changed files with 4 additions and 0 deletions
|
@ -609,6 +609,10 @@ square brackets, like this:
|
|||
echo $PATH[3]
|
||||
</pre>
|
||||
|
||||
Note that array indices start at 1 in fish, not 0, as is more common
|
||||
in other languages. This is because many common unix tools like seq
|
||||
are more suited to such use.
|
||||
|
||||
If you do not use any brackets, all the elements of the array will be
|
||||
written as separate items. This means you can easily iterate over an
|
||||
array using this syntax:
|
||||
|
|
Loading…
Reference in a new issue