Today, I solved a small but annoying problem: accidentally mistyping "Terminal" as "Termianl" in Spotlight. Here's how I created a clever workaround:
- Opened Script Editor on my Mac.
- Wrote a short AppleScript that opens Terminal.app and passes all arguments:
on run argv
tell application "Terminal"
activate
if (count of argv) > 0 then
set cmd to ""
repeat with arg in argv
set cmd to cmd & " " & quoted form of arg
end repeat
do script (text 2 thru -1 of cmd)
end if
end tell
end run
- Exported the script as an application (make sure Run-only is checked) named "Termianl.app".
- Saved it in my Applications folder (`Cmd + Shift + G` to the path `~/Applications` and then click `Applications`).
Now, when I accidentally type "Termianl" in Spotlight, it opens the real Terminal.app. The script even passes any additional arguments, so I can use it to run commands directly.
This little hack saves me from frustration and keeps my workflow smooth, even when my fingers get ahead of my brain!
Why This Matters
While this might seem like a small issue, it's these little annoyances that can disrupt our flow and productivity. By creating this shortcut, I've eliminated a frequent source of frustration in my daily workflow.
Extending the Concept
This same approach can be used for other commonly mistyped applications or commands. For example, you could create similar shortcuts for:
- "Safrai" instead of "Safari"
- "Fiinder" instead of "Finder"
- "Phtooshop" instead of "Photoshop"
Security Considerations
While this script is harmless, it's always a good practice to review any scripts or applications you create or download before running them on your system. Make sure you understand what the script does and that you trust its source.
Conclusion
Sometimes, the smallest tweaks can make a big difference in our daily computing experience. This simple AppleScript solution not only fixes a minor annoyance but also serves as a great example of how we can use scripting to customize and improve our workflow.
Have you created any clever shortcuts or workarounds for your common typos or workflow issues? Share your experiences in the comments below!
Enjoyed this post?
Get notified when I publish something new. No spam, unsubscribe anytime.