AutoYADM commit: 2025-04-22 14:05:13
This commit is contained in:
parent
93f3562923
commit
65272a1ba3
1 changed files with 17 additions and 1 deletions
|
@ -17,10 +17,26 @@ function find_pdf
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if set -q _flag_q
|
||||||
|
set ret 1
|
||||||
|
else
|
||||||
|
set ret 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function qecho
|
||||||
|
if not set -q _flag_q
|
||||||
|
echo $argv[1]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
set -l src (path resolve $argv[1])
|
set -l src (path resolve $argv[1])
|
||||||
# echo $src
|
# echo $src
|
||||||
# string replace
|
# string replace
|
||||||
set -l targ (string replace --filter '.typ' '.pdf' $src)
|
if not string match -q '.typ' $src
|
||||||
|
qecho "$(path basename $src) is not a Typst file!"
|
||||||
|
return $ret
|
||||||
|
end
|
||||||
|
set -l targ (string replace '.typ' '.pdf' $src)
|
||||||
set -l base (path basename --no-extension $src).pdf
|
set -l base (path basename --no-extension $src).pdf
|
||||||
if test -f "$targ" -a '' != ''
|
if test -f "$targ" -a '' != ''
|
||||||
# zathura "$targ" &>/dev/null &
|
# zathura "$targ" &>/dev/null &
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue