Merge pull request #284 from oh-my-fish/deprecate-available
lib: deprecate `available` functionpull/276/head^2
commit
e04ba4f3f9
@ -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
|
@ -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
|
Loading…
Reference in New Issue