AutoYADM commit: 2025-04-22 13:35:13
This commit is contained in:
parent
0aae02e029
commit
51ef9ae469
1 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue