Shortcuts Prioritizes the Complex Over the Basics

I hate Shortcuts. I don’t ever want to use it. The interface is bad, nothing ever makes any sense, but it’s the only way to do certain things, especially if you want to have some kind of automation that works on iOS too. Yesterday, when I was writing my blog post, I wanted to include screenshots of the ugly PlexAmp interface. The screenshots for iOS are almost always vertical 9:16, so it’s awkward to stack many of those vertically. I usually use Shortcuts’ Combine Images to take a selection of images and combine them horizontally into one wide set of screenshots.

The problem is that Combine Images has no control over direction. It does this pretty sophisticated image operation, but it only does it newest (left) to oldest (right). That’s asinine because we’re in a culture where you read left to right so the oldest thing should be on the left. There should at least be a checkbox to reverse the order. There isn’t. It does it that way, and that way only.

If this was Python I’d just images[::-1] and call it a day. I can’t do regex to save my life, but index slicing is a piece of cake. Even if I didn’t know the index slicing off the top of my head there’s both list(reversed(images)) to reverse a list to a new list, and a images.reverse() method to modify your existing list in-place. Any of these things you can find by using Google, or Duck Duck Go, or whatever LLM you want. There is so much good, thorough documentation.

Shortcuts is too sophisticated and user-friendly to offer these solutions.

Unfortunately, I can’t use Python to do it if I want it to work on iOS, I must use Shortcuts. I should be able to build something to reverse the order with these off-brand Duplo blocks, right? Searching inside Shortcuts yields no results for “order”, “reorder”, “reverse”. NO RESULTS, JERRY!

I asked Gemini, and it said that there wasn’t anything either, but I could construct a for loop with a counter to iterate through the list I wanted to reverse. The Dark Ages. Duck Duck Go’s privacy-focused duck.ai offered access to GPT-4o and it simply made-up “Reverse action” in Shortcuts. That’s one way to solve a problem.

I asked on Mastodon, incredulous that there was no way to do this, and Nick Foster recommended the third-party Shortcuts tools from Toolbox Pro and Actions. I didn’t love having to do it with a third party library, but Sindre Sorhus’ Actions was free, so it was worth a shot.

Sure enough, Actions has Reverse List, and it reversed the list, but Combine Images would not accept it and said that it required image data. I thought that this might be a type issue, as data passes through in a variety of formats in Shortcuts, so maybe Reverse List altered it in a way that Combine Images didn’t like. Maybe this was now a list of files? More on this later.

I went to look for something to map paths back to images, which meant I was searching for “files” based operations. That’s when I came across Filter Files.

You’ll never fucking guess what Filter Files can do. Mostly because the description for Filter Files is poorly written.

Given a list of files, this action returns the files that match the given criteria.

Sort by
Optionally, what to sort the files by.

Limit
Whether or not to limit the number of files that are passed as output.

Get
The maximum number of files.

Result
The files that match the criteria.

It’s not reversing the order, it’s Sort by: Creation Date and then the hidden dropdown for Order: Oldest to Newest appears. How did something so simple —reversing the order of a list— get turned into a bunch of hard-coded, and very specific interface elements.

But wait, there’s more! Don’t forget about Filter Images. It has an identical description for what it does. I would argue that if you have two very similar but distinct items that’s precisely when you don’t want their descriptions to match. They are mostly the same, except Filter Images includes width, height, orientation, date taken, time taken, frame rate, and duration. That’s a lot of stuff in both of these filters that would be hard to code for yourself, so it’s not like the Shortcuts team is lazy. They just didn’t execute well on making sure you could know where these powerful functions are or how to use them, or making lesser functions (like a simple reverse).

For my purposes, either Filter can be used interchangeably, but neither showed up when I was trying to find a way to do this with Gemini, searching the internet, or asking online. In fact, when I posted about finding these a couple people thanked me because they never knew these existed.

This raises questions such as:

  • Why are there two of these?
  • Shouldn’t there just be a way to to reorder or sort any data based on the attributes of the incoming data, and not hardcoding different filter sets that mostly overlap?
  • Why don’t either of these turn up when you search for ‘order’, ‘reverse’, or ‘reorder’ when ‘Order’ is the named attribute in the secret menu that appears?

This might sound familiar if you read my rant about Search in Settings, but every part of Apple is inclined to write their own search from scratch, which means they all suck, and they all suck differently. Search is also the primary interface for building any automation in Shortcuts. If you don’t know exactly what you need you might not find it.

Connect the Dots La La La

One of the other many annoying things about Shortcuts is that when you change a block upstream of another it can break the connections that Shortcuts automatically made for you. Even if the names of the variables still match, there is some invisible connection logic that Shortcuts does. This is unlike any other scripting language where you just need to make sure you didn’t make a typo with the variable and you’re all set.

Like if I type:

my_list = [ 1, 2, 3 ]

reverse_list = my_list[::-1]

print(reverse_list)

It won’t break if I change the name of my_list to your_list as long as I do it in both places. Python doesn’t care. It’s just text. It’s not invisibly-connected text. Connection is visible as the matching characters and that’s it.

This is relevant because I noticed that even when I was passing perfectly good images from Filter that Combine didn’t want to work. There was no thin, gray line connecting Filter and Combine, but Combine had the variable pointing to the output of Filter. I even right-clicked on the variable in Combine, and did Select Variable to point it at Filter’s output but it wouldn’t connect. It showed as valid —valid is blue, if you wanted to know— but obviously the data wasn’t flowing.

A side-by-side set of two screenshots showing the same Shortcut set. They are identical, except the one on the left does not have an upstream connection, even though it references the upstream variable name.
You'd think the lack of a line makes it easy to debug the missing connection, but good luck figuring out what you can change when everything else is identical to the working version.

I deleted the Combine and put down a fresh one after Filter, and it connected correctly. It turns out that there’s a bug in Shortcuts (GASP! Shock! Horror!) where Combine Images will permanently lose it’s upstream connection if you put anything above it, no matter what variable you select. However this only happens on my MacBook Pro running 15.3, not my iPhone running iOS 18.3, which does connect Combine Images as expected with it’s phantasmal powers.

Remember when I said I’d get back to Sindre’s Reverse List? Well it fucking works great, as a matter of fact! It wasn’t working when I put it down only because it broke the invisible Shortcuts connection, just like what happened with the Filters. I only figured it out after I went through the other steps.

It’s good to know that there’s a solution that doesn’t require installing third party tools, but the simplicity of a function that does one thing, like reverse, and it’s the thing it’s called, is something the people working on Shortcuts could surely take a lesson from. Rather than Filter Files or Filter Images, which are packed with functionality but don’t explain themselves, and aren’t as universal.

2025-03-12 15:40:00

Category: text