What am I doing wrong in the function below that accepts the name of a
variable and an item to be removed and attempts to remove it?

function listrm -a listName item
  set list $$listName
  if set -l index (contains -i $item $list)
    set -eg $listName[$index]
  else
    echo $item was not found in $listName
  end
end

set -g colors red green blue
listrm colors green
# The value of colors is not changed.

-- 
R. Mark Volkmann
Object Computing, Inc.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to