mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-22 13:11:00 +08:00
lib: deprecate available
function
This PR officially marks available as deprecated, moving the deprecated functionality to omf plugin compat quarantine directory.
This commit is contained in:
parent
370913ec93
commit
65dfadfc02
|
@ -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
|
10
pkg/omf/functions/compat/available.fish
Normal file
10
pkg/omf/functions/compat/available.fish
Normal file
|
@ -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
Block a user