ion-shell 1.0.1

The Ion Shell
# Standard Arrays

let array = [1  [2 3]  4 [5 6]]
for i in @array
    echo $i
end

for i in [1  [2 3]  4 [5 6]]
    echo $i
end

# Array Command Substitution

let array_process = @[echo a  b c d    e]
for i in @array_process
    echo $i
end

for i in @[echo a  b c d    e]
    echo $i
end

# Array Concatenation

let new_array = [@array @array_process]
for i in @new_array
    echo $i
end

# As Command Arguments

echo @array
echo @array_process
echo @new_array

# Slice by ID

let array = [ 1 2 3 ]
echo @array[0]
echo @array[1]
echo @array[2]

echo [ 1 2 3 ][0]
echo [ 1 2 3 ][1]
echo [ 1 2 3 ][2]

echo @[echo 1 2 3][0]
echo @[echo 1 2 3][1]
echo @[echo 1 2 3][2]

# Slice by Range

let array = [ 1 2 3 4 5 ]
echo @array[0..1]
echo @array[0...1]
echo @array[..3]
echo @array[3..]
echo @array[..]