obsidian-another-quick-switcher icon indicating copy to clipboard operation
obsidian-another-quick-switcher copied to clipboard

Bug: Command-ids should not contain spaces

Open chrisgrieser opened this issue 3 years ago • 1 comments
trafficstars

One of the recent updates introduces the creation of custom quick switchers (which was awesome, btw!).

However, with the new commands, they now by default contain spaces (e.g. "Recent Search"). These are carried over to the command id: obsidian-another-quick-switcher:search-command_Recent search

having spaces in the command id is a problem, since it prevents assigning the command in the vimrc plugin via exmap:

" go = open quick Switcher
exmap quickSwitcher obcommand obsidian-another-quick-switcher:search-command_Recent search
nmap go :quickSwitcher
vmap go :quickSwitcher

Replacing all spaces in the command-id with hyphens would fix this issue.

chrisgrieser avatar Aug 30 '22 13:08 chrisgrieser

Thank you for your report, @chrisgrieser :)

I agree with you. But I think it affects only vimrc plugin (because Obsidian accepts the key name that contains whitespace). And it affects users who use AQS.

So, I'll implement it in the next major release (maybe soon), which includes the features optimized for Obsidian v0.16.0 (ex: tabs). Probably, in v7.0.0-beta1 👍

tadashi-aikawa avatar Aug 30 '22 13:08 tadashi-aikawa

@chrisgrieser Released in 7.0.0-beta1 🚀

tadashi-aikawa avatar Sep 03 '22 10:09 tadashi-aikawa

Released in v7.0.0 🚀

tadashi-aikawa avatar Sep 24 '22 08:09 tadashi-aikawa

minor follow-up issue: it seems that only the first space is replaced, which in some rare cases like the file name search is noticable:

obsidian-another-quick-switcher:search-command_recent-search
obsidian-another-quick-switcher:search-command_file-name search <-- still a space there
obsidian-another-quick-switcher:search-command_landmark-search
obsidian-another-quick-switcher:search-command_star-search
obsidian-another-quick-switcher:search-command_backlink-search

chrisgrieser avatar Sep 24 '22 15:09 chrisgrieser

Thanks. Fix in v7.0.1 👍

tadashi-aikawa avatar Sep 24 '22 15:09 tadashi-aikawa