mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-22 04:01:19 +08:00
Fix ant completion (#8344)
If $xdg_chache_home is empty, this is not a valid fish expression: [ \( -z \) -o \( ! -d \) ] and results into an error. While at it, also use $XDG_CACHE_HOME if that directory does not exist. This seems better than falling back to $HOME/.cache, which the user has explicitly overridden via $XDG_CACHE_HOME.
This commit is contained in:
parent
ec8844d834
commit
72f55ab206
@ -32,7 +32,7 @@ function __fish_complete_ant_targets -d "Print list of targets from build.xml an
|
||||
set -l buildfile $argv[1] # full path to buildfile
|
||||
|
||||
set -l xdg_cache_home $XDG_CACHE_HOME[1]
|
||||
if [ \( -z $xdg_cache_home \) -o \( ! -d $xdg_cache_home \) ]
|
||||
if test -z "$xdg_cache_home"
|
||||
set xdg_cache_home $HOME/.cache
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user