diff --git a/share/functions/__fish_print_packages.fish b/share/functions/__fish_print_packages.fish index 9c8e489ed..830baabca 100644 --- a/share/functions/__fish_print_packages.fish +++ b/share/functions/__fish_print_packages.fish @@ -12,12 +12,6 @@ function __fish_print_packages #Get the word 'Package' in the current language set -l package (_ "Package") - # Set up cache directory - if test -z "$XDG_CACHE_HOME" - set XDG_CACHE_HOME $HOME/.cache - end - mkdir -m 700 -p $XDG_CACHE_HOME - if type -q -f apt-cache # Do not generate the cache as apparently sometimes this is slow. # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547550 @@ -42,6 +36,14 @@ function __fish_print_packages return end + ### BEGIN CACHED RESULTS ### + + # Set up cache directory + if test -z "$XDG_CACHE_HOME" + set XDG_CACHE_HOME $HOME/.cache + end + mkdir -m 700 -p $XDG_CACHE_HOME + # Caches for 5 minutes if type -q -f pacman set cache_file $XDG_CACHE_HOME/.pac-cache.$USER