oh-my-fish/plugins/fish-spec/spec.functions.fish
Jorge Bucaran 63fd25dacb ❯❯❯ Complete overhaul of brand new Oh-My-Fish test framework.
+ Add documentation and examples.
+ Add new functions to interact with the framework:
  + spec.eval - eval a function by name and echo its description field
  + spec.functions - prints functions currently in scope that match the key glob
  + spec.log - log a message / test result
  + spec.run - run suite of tests
+ Rename list.erase to erase.
2015-01-14 02:22:07 +09:00

17 lines
388 B
Fish

# NAME
# spec.functions - echo functions existing in the global scope that match
# the key glob.
# SYNOPSIS
# spec.functions <key>
#
# EXAMPLES
# spec.functions "describe_"
# spec.functions "before_"
#/
function spec.functions -a key
if [ -n "$key" ]
# Skip empty strings to avoid fetching all global functions.
functions -n | grep \^"$key"
end
end