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
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 ./
.