diff --git a/lib/available.fish b/lib/available.fish deleted file mode 100644 index b6cfa14..0000000 --- a/lib/available.fish +++ /dev/null @@ -1,9 +0,0 @@ -# SYNOPSIS -# available [name] -# -# OVERVIEW -# Check if a function or program is available. - -function available -a name -d "Check if a function or program is available." - type "$name" ^/dev/null >&2 -end diff --git a/pkg/omf/functions/compat/available.fish b/pkg/omf/functions/compat/available.fish new file mode 100644 index 0000000..18dc39a --- /dev/null +++ b/pkg/omf/functions/compat/available.fish @@ -0,0 +1,10 @@ +function available + echo (status -t)[5] | read -la caller + printf 'warning: function %savailable%s is deprecated and will be removed soon.\n' \ + (set_color -u) (set_color normal) + + contains input $caller + or echo $caller + + type -q $argv +end