mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 08:41:13 +08:00
Rename existing cache files
We're already moving them, we can remove the awkward dot that hides them, and while we're doing that remove the useless $USER as well. Most systems will have only one of these files - it's rare to run a second package manager (especially for anything more than bootstrapping a container).
This commit is contained in:
parent
a66fa5262e
commit
423829a634
|
@ -11,7 +11,7 @@ function __fish_print_eopkg_packages
|
|||
# Determine whether to print installed/available packages
|
||||
|
||||
if set -q _flag_installed
|
||||
set -l cache_file $xdg_cache_home/.eopkg-installed-cache.$USER
|
||||
set -l cache_file $xdg_cache_home/eopkg-installed
|
||||
if test -f $cache_file
|
||||
cat $cache_file
|
||||
set -l age (path mtime -R -- $cache_file)
|
||||
|
@ -25,7 +25,7 @@ function __fish_print_eopkg_packages
|
|||
eopkg list-installed -N | cut -d ' ' -f 1 >$cache_file &
|
||||
return 0
|
||||
else
|
||||
set -l cache_file $xdg_cache_home/.eopkg-available-cache.$USER
|
||||
set -l cache_file $xdg_cache_home/eopkg-available
|
||||
if test -f $cache_file
|
||||
cat $cache_file
|
||||
set -l age (path mtime -R -- $cache_file)
|
||||
|
|
|
@ -9,7 +9,7 @@ function __fish_print_pacman_packages
|
|||
or return
|
||||
|
||||
if not set -q _flag_installed
|
||||
set -l cache_file $xdg_cache_home/.pac-cache.$USER
|
||||
set -l cache_file $xdg_cache_home/pacman
|
||||
if test -f $cache_file
|
||||
cat $cache_file
|
||||
set -l age (path mtime -R -- $cache_file)
|
||||
|
|
|
@ -5,7 +5,7 @@ function __fish_print_port_packages
|
|||
set -l xdg_cache_home (__fish_make_cache_dir)
|
||||
or return
|
||||
|
||||
set -l cache_file $xdg_cache_home/.port-cache.$USER
|
||||
set -l cache_file $xdg_cache_home/port
|
||||
if test -f $cache_file
|
||||
cat $cache_file
|
||||
set -l age (path mtime -R -- $cache_file)
|
||||
|
|
|
@ -10,7 +10,7 @@ function __fish_print_rpm_packages
|
|||
|
||||
if type -q -f /usr/share/yum-cli/completion-helper.py
|
||||
# If the cache is less than six hours old, we do not recalculate it
|
||||
set -l cache_file $xdg_cache_home/.yum-cache.$USER
|
||||
set -l cache_file $xdg_cache_home/yum
|
||||
if test -f $cache_file
|
||||
cat $cache_file
|
||||
set -l age (path mtime -R -- $cache_file)
|
||||
|
@ -29,7 +29,7 @@ function __fish_print_rpm_packages
|
|||
# as a background job and cache the results.
|
||||
if type -q -f rpm
|
||||
# If the cache is less than five minutes old, we do not recalculate it
|
||||
set -l cache_file $xdg_cache_home/.rpm-cache.$USER
|
||||
set -l cache_file $xdg_cache_home/rpm
|
||||
if test -f $cache_file
|
||||
cat $cache_file
|
||||
set -l age (path mtime -R -- $cache_file)
|
||||
|
|
|
@ -9,7 +9,7 @@ function __fish_print_xbps_packages
|
|||
or return
|
||||
|
||||
if not set -q _flag_installed
|
||||
set -l cache_file $xdg_cache_home/.xbps-cache.$USER
|
||||
set -l cache_file $xdg_cache_home/xbps
|
||||
if test -f $cache_file
|
||||
set -l age (path mtime -R -- $cache_file)
|
||||
set -l max_age 300
|
||||
|
|
Loading…
Reference in New Issue
Block a user