mirror of
https://github.com/eRgo35/dots.git
synced 2025-12-17 07:56:11 +01:00
funny fish
This commit is contained in:
15
.config/fish/functions/_pure_check_availability.fish
Normal file
15
.config/fish/functions/_pure_check_availability.fish
Normal file
@@ -0,0 +1,15 @@
|
||||
function _pure_check_availability \
|
||||
--description "Ensure command is available on system" \
|
||||
--argument-names \
|
||||
feature_flag \
|
||||
required_command
|
||||
|
||||
set FAILURE 1
|
||||
|
||||
if not type -q $required_command # command, function or alias are OK
|
||||
echo (set_color $pure_color_warning) \
|
||||
"$feature_flag feature requires: `$required_command`" \
|
||||
(set_color $pure_color_normal)
|
||||
return $FAILURE
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user