mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-12-04 07:43:42 +08:00
9 lines
227 B
Fish
9 lines
227 B
Fish
# Remove item from list. List must be the name of a global variable.
|
|
# @params <item> <list>
|
|
function array.delete
|
|
set -l item $argv[1]
|
|
if set -l index (contains -i -- $item $$argv[2])
|
|
set -e $argv[2][$index]
|
|
end
|
|
end
|