···11+function fish_remove_list --description 'Remove an item from a list'
22+ set list_name $argv[1]
33+ set list $$list_name
44+55+ set target (printf %s\n $list | fzf -1 -q "$argv[2]")
66+ test -n $target || return 1
77+88+ if not set -l index (contains -i "$target" $fish_user_paths)
99+ echo "'$target' was not found in $list_name"
1010+ return 1
1111+ end
1212+1313+ if confirm "Remove '$target' from $list_name?"
1414+ set -e $list_name[1][$index] && echo -e "\033[2KRemoved '$target' from \$fish_user_paths"
1515+ end
1616+end