mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:52:08 +02:00
Completions (zsh, fish): check for python3 (#1310)
Both the zsh and fish completions depend on python3. When the completitions kick in with those shells where no python3 is found it throws errors. Check python3 is installed, otherwise return no completitions to avoid throwing errors Co-authored-by: Andrew Davis <adavis@adavis.net>
This commit is contained in:
@@ -2,6 +2,11 @@ if not type -q fastfetch
|
||||
exit
|
||||
end
|
||||
|
||||
command -q python3
|
||||
if test $status -ne 0
|
||||
exit
|
||||
end
|
||||
|
||||
complete -c fastfetch -f
|
||||
|
||||
function __fastfetch_complete_bool
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
#compdef fastfetch
|
||||
|
||||
function _fastfetch() {
|
||||
|
||||
whence python3 &> /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
local state
|
||||
|
||||
local -a opts=("${(f)$(
|
||||
|
||||
Reference in New Issue
Block a user