2023-01-04 01:28:50 +00:00
|
|
|
#!/usr/bin/env
|
2023-01-05 16:33:27 +00:00
|
|
|
source (status dirname)/../include/parent.fish
|
2023-01-04 01:28:50 +00:00
|
|
|
|
|
|
|
function import
|
2023-01-05 16:33:27 +00:00
|
|
|
set -f self_directory (parent_script_dir)
|
2023-01-04 01:28:50 +00:00
|
|
|
if set -q debug;
|
|
|
|
echo "importing $argv.fish from [$self_directory]"
|
|
|
|
end
|
2023-01-05 16:33:27 +00:00
|
|
|
if starts_with '@' "$argv"
|
|
|
|
set -f include_dir "$(status dirname)/../include/"
|
|
|
|
set -f import_path \
|
|
|
|
(string replace '@' "$include_dir" "$argv")
|
|
|
|
source "$import_path.fish"
|
|
|
|
return 0
|
|
|
|
end
|
2023-01-04 14:23:25 +00:00
|
|
|
if starts_with '/' "$argv"
|
|
|
|
source "$argv.fish"
|
|
|
|
return 0
|
|
|
|
end
|
2023-01-04 01:28:50 +00:00
|
|
|
source $self_directory/"$argv.fish"
|
|
|
|
end
|