diff --git a/.config/helix/scripts/hx-typ-zathura.fish b/.config/helix/scripts/hx-typ-zathura.fish index c2f5ace4..7d6fabe9 100755 --- a/.config/helix/scripts/hx-typ-zathura.fish +++ b/.config/helix/scripts/hx-typ-zathura.fish @@ -112,6 +112,8 @@ end # absolute path of %{buffer_name} file set -l src (path resolve $argv[1]) +# echo $src +# return 0 # exit if not a typst file if not string match -q '*.typ' $src qecho "$(path basename $src) is not a Typst file!" @@ -119,8 +121,11 @@ if not string match -q '*.typ' $src end # change abs path to pdf extension set -l targ (string replace '.typ' '.pdf' $src) +echo $targ # get pdf target's base name 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 test -f "$targ"