mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-20 07:41:12 -03:00
14 lines
322 B
Fish
14 lines
322 B
Fish
# localization: skip(private)
|
|
function __fish_data_with_file
|
|
set -l path $argv[1]
|
|
set -l cmd $argv[2..]
|
|
if set -q __fish_data_dir[1]
|
|
if not string match -rq -- ^/ $path
|
|
set path $__fish_data_dir/$path
|
|
end
|
|
$cmd $path
|
|
else
|
|
status get-file $path | $cmd
|
|
end
|
|
end
|