Page link relative paths with `../` fail to autocomplete with "no match found" error

Steps to reproduce

  • Open Sanbox vault
  • Open a sub-page such as “Get started with Obsidian”
  • Type [[ and start typing “…/Start Here”. Note how autocomplete fails with “no match found” error
  • Now set Options > Files and links > New link format > Relative path to file
  • Type [[ and start typing “…/Start Here”. This will also fail the same way.
  • Type [[ and start typing “Start Here”. This time it will autocomplete. Press Enter to insert [[../Start Here|Start Here]].
  • Now delete the display label (the 2nd “Start Here” + the label marker |). You’re back to the state when you were typing Start Here manually, with “no match found”.
  • Side effect: Enter # in an attempt to link to a subheader on the other page => it will replace the whole link instead of adding a # (this is a real-world case that made me discover the error)

Did you follow the troubleshooting guide? [Y/N]

Y (tested in Sandbox vault)

Expected result

It should autocomplete relative “…/” paths ideally in both modes, and at least in relative path mode, and also support adding # after said path.

Actual result

It doesn’t find autocomplete matches and as a side effect, # replaces the whole link, losing the page name.

Environment

SYSTEM INFO:
Obsidian version: v1.6.5
Installer version: v1.4.13
Operating system: #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 5.15.0-113-generic
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Peek 2024-07-01 Page link relative paths with .. fail to autocomplete with "no match found" error

Personally I’m not sure # should replace the whole link in any case. So if you disable this behavior it would also fix my particular issue with sub-headings, but ultimately you’ll want to fix relative path …/ autocomplete anyway.

To support In relative path mode, always add `./` and `../` in front of links you’ll also want to make autocomplete work with ./.

I don’t consider this a bug and I am not even sure we should do this (consider .. in the fuzzy path matcher).

Please, open a feature request. Thanks

The link format setting you’re referring to is not how Obsidian treats/reads links, it’s related to how it (re-)formats links to make them unique of you’ve used the same file names multiple places in your vault.

Links are not meant to have the need to be fully qualified, so as such you could that if it can Obsidian will ignore the folder structure (to be a little informal).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.