mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08: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:
parent
89d3924659
commit
8a11aa0f8f
@ -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)$(
|
||||
|
Loading…
x
Reference in New Issue
Block a user