oh-my-fish/plugins/msg/msg.util.str.has.fish

6 lines
136 B
Fish
Raw Normal View History

# True if substring exists in string.
# @params <substring> <string>
function msg.util.str.has
printf $argv[2] | grep -q $argv[1]
end