AutoYADM commit: 2025-04-28 17:00:05
This commit is contained in:
parent
94e91900e8
commit
806267f147
1 changed files with 5 additions and 0 deletions
|
@ -112,6 +112,8 @@ end
|
||||||
|
|
||||||
# absolute path of %{buffer_name} file
|
# absolute path of %{buffer_name} file
|
||||||
set -l src (path resolve $argv[1])
|
set -l src (path resolve $argv[1])
|
||||||
|
# echo $src
|
||||||
|
# return 0
|
||||||
# exit if not a typst file
|
# exit if not a typst file
|
||||||
if not string match -q '*.typ' $src
|
if not string match -q '*.typ' $src
|
||||||
qecho "$(path basename $src) is not a Typst file!"
|
qecho "$(path basename $src) is not a Typst file!"
|
||||||
|
@ -119,8 +121,11 @@ if not string match -q '*.typ' $src
|
||||||
end
|
end
|
||||||
# change abs path to pdf extension
|
# change abs path to pdf extension
|
||||||
set -l targ (string replace '.typ' '.pdf' $src)
|
set -l targ (string replace '.typ' '.pdf' $src)
|
||||||
|
echo $targ
|
||||||
# get pdf target's base name
|
# get pdf target's base name
|
||||||
set -l base (path basename --no-extension $src).pdf
|
set -l base (path basename --no-extension $src).pdf
|
||||||
|
echo $base
|
||||||
|
return 0
|
||||||
|
|
||||||
# if a suitable pdf exists in the same dir, open it
|
# if a suitable pdf exists in the same dir, open it
|
||||||
if test -f "$targ"
|
if test -f "$targ"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue