AutoYADM commit: 2025-04-22 14:00:12
This commit is contained in:
parent
388affce48
commit
93f3562923
1 changed files with 10 additions and 10 deletions
|
@ -21,6 +21,7 @@ set -l src (path resolve $argv[1])
|
|||
# echo $src
|
||||
# string replace
|
||||
set -l targ (string replace --filter '.typ' '.pdf' $src)
|
||||
set -l base (path basename --no-extension $src).pdf
|
||||
if test -f "$targ" -a '' != ''
|
||||
# zathura "$targ" &>/dev/null &
|
||||
z "$targ"
|
||||
|
@ -30,18 +31,17 @@ else
|
|||
# if we're not, search from cwd
|
||||
if git rev-parse --is-inside-work-tree &>/dev/null
|
||||
# echo in git
|
||||
set -l root (git rev-parse --show-toplevel)
|
||||
set root (git rev-parse --show-toplevel)
|
||||
# echo $root
|
||||
set -l base (path basename --no-extension $src).pdf
|
||||
if not find_pdf "$root" "$base"
|
||||
if set -q _flag_q
|
||||
return 1
|
||||
else
|
||||
echo "$base couldn't be found!"
|
||||
end
|
||||
end
|
||||
else
|
||||
echo out git
|
||||
set -l root (pwd)
|
||||
set root (pwd)
|
||||
end
|
||||
if not find_pdf "$root" "$base"
|
||||
if set -q _flag_q
|
||||
return 1
|
||||
else
|
||||
echo "$base couldn't be found!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue