AutoYADM commit: 2025-04-22 13:35:13

This commit is contained in:
Daniel Fichtinger 2025-04-22 13:35:13 -04:00
parent 0aae02e029
commit 51ef9ae469

View file

@ -5,8 +5,14 @@ set -l src (path resolve $argv[1])
# string replace
set -l targ (string replace --filter '.typ' '.pdf' $src)
if test -f "$targ"
echo $targ
zathura "$targ" &>/dev/null &
else
echo no file
# no such file in current dir, time to search!
# if we're in a git repo, search from root
# if we're not, search from cwd
if git rev-parse --is-inside-work-tree &>/dev/null
echo in git
else
echo out git
end
end