oh-my-fish/plugins/msg/msg.util.str.has.fish
Jorge Bucaran 2542929eb9 Separate msg utility functions into their own file:
+ msg.util.get.color.fish
  + msg.util.random.color.fish
  + msg.util.set.color.fish
  + msg.util.str.get.fish
  + msg.util.str.has.fish
2015-01-09 14:08:47 +09:00

6 lines
136 B
Fish

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