Jump to content

Alfred crashes when using macOS text replacement feature with the ~ char


ElisabethOrme

Recommended Posts

Hi everyone, please note that my macOS is in German, so I might not get all of menus translated perfectly :)

I rely heavily on macOS's text replacement feature. My name and email address are quite long, so i use a shortcut for those, among other things. "xyz" is expanded to my email address, "shruggie" to ¯\_(ツ)_/¯, whenever I write text in a text application or text field. Whenever I'm in an app without text expansion, like the terminal, I like to get alfred's help by just opening alfred, typing the text, let macOS expand it, copy it out and get on with my day. That has worked 100% - until I tried it with the tilde (~). Alfred crashes whenever I write "tilde" in alfred and macOS offers the replacement text (~). I haven't tried with other special chars, since I couldn't get alfred to recover and had to reboot my mac every time!

Steps to reproduce:

1. open macOS system settings, go to text replacements, enter a new entry replacing the text "tilde" with the char ~ 
2. open a text editor and verify, that the replacement works properly on typing "tilde"
3. open alfred and type "tilde" and wait a few seconds, until macOS shows the replacement option - this is when alfred crashes every time I tried.

 

Versions:
Alfred 5.1.3 [2175]
macOS Version 14.0 (23A344)

Screenshot:
In the screenshot you see how I end up when trying that, alfred being stuck like that, on top of other windows, uncloseable and unrecoverable. (Side question: how do I force quit and reboot alfred?)


Btw. I don't know if alfred was meant to be used that way, but it has been truly helpful for me most of the time :)

Thank you for your time and your help!

 

Bildschirmfoto 2023-10-06 um 22.10.04.png

Edited by ElisabethOrme
Link to comment
Share on other sites

I'm sorry that this post is not specifically going to answer your problem but, instead, ask a question. Is there any reason you're not using Alfred's Snippets for text expansion? Of course, they do require Alfred's Powerpack but they are a much more direct way of using text expansion than the method you're using.

 

I'll leave someone more expert to deal with the crashing question but just thought it worth exploring this question in the meantime.

 

Stephen

Link to comment
Share on other sites

@ElisabethOrme I've had a look at this and have been able to replicate the issue. The freeze occurs in the macOS framework, rather than in Alfred, which is why Alfred doesn't quit and there's no crash log.

 

The simplest way to explain what's happening here is that Alfred instantaneously uses ~ to start the File Navigation process; When you type tilde to expand into the ~ symbol, macOS gets stuck trying to replace in the ~ symbol, and the text field it's trying to replace into is no longer available in memory (even though you still see it on your screen) as Alfred has already moved on to switching to the File Navigation.

 

There are a few ways to work around this:

  • As @Stephen_C suggested, you could use Alfred's snippets feature instead, as Alfred's text expansion works fine in Terminal, saving you a step
  • Change the symbol used to open Alfred's File Navigation under Features > File Search > Advanced > Home Folder, where you can choose an alternative from the dropdown

We'll look at putting a reproducible case to submit to Apple as a bug report, but I'm not holding high hopes that this will be treated as a priority, so it's best to use one of the options above as a solution :) Let me know how you get on.

 

Cheers,
Vero

Link to comment
Share on other sites

Dear @Vero, thank you for your quick and exhaustive answer. I now understand the problem and can absolutely work with one of your workarounds. To answer your and @Stephen_C's question - I already maintain quite the list of snippets that are syncronized to my mobile devices by iCloud, so I'm reluctant to start another list in another place :)

I consider this issue closed - thank you!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...