From 2454f2327a32d141af2f9dd797a641c0d0a5ce74 Mon Sep 17 00:00:00 2001 From: Derek Stavis <dekestavis@gmail.com> Date: Tue, 23 Feb 2016 20:23:50 -0300 Subject: [PATCH] lib: deprecate `available` function This PR officially marks available as deprecated, moving the deprecated functionality to omf plugin compat quarantine directory. --- lib/available.fish | 9 --------- pkg/omf/functions/compat/available.fish | 7 +++++++ 2 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 lib/available.fish create mode 100644 pkg/omf/functions/compat/available.fish 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..931b211 --- /dev/null +++ b/pkg/omf/functions/compat/available.fish @@ -0,0 +1,7 @@ +function available + printf 'warning: function %savailable%s is deprecated and will be removed soon.\n %s\n' \ + (set_color -u) (set_color normal) \ + (status -t)[5] >&2 + + type -q $argv +end -- GitLab