Oh my XED! When a Command defeats an aliasmacOS · xcode · utils
They are mandatory when it comes to my environment! Which 99% of the time that environment is either ohmyzsh or bash-it. Both config frameworks are lovely and both have shit ton of built in aliases that overtime I have learned to just learn rather than fight and modify. Here’s oh-my-zsh aliases: https://github.com/robbyrussell/oh-my-zsh/wiki/Cheatsheet#alias and bash-it by default disables all their baked in aliases, which allows you to enable a suite/set of aliases you prefer (platform specific). I like how Bash-it handles custom aliases, its very clean and at the time when I was first migrating to Bash-it! So instead of a typical ~/.bash_aliases file in your home directory, you can simply move all your custom aliases to a directory bash-it defines for you that will not get tracked by git. Genius!! }
Anyway, how many custom aliases do you have?
grep -c 'alias' /path/to/custom.aliases.bash
There are several ways of skinning a cat (so to speak) here… So count your custom aliases anyway you feel is easiest… Share as well, as I’m always curious and eager to learn little CLI tricks!
Alright, back to the point of my little micro article here… So up until recently, I had always rolled with a custom alias
xcopen that would open up an Xcode workspace or project. Welp, looks like the folks at Apple had the same alias now turned into a native built-in command with Darwin *nix!
The command is
xedand here’s the manual page for it…
xed – Xcode text editor invocation tool.
The xed tool launches the Xcode application and opens the given documents, or opens a new untitled document, optionally with the contents of standard in.
xed is fuckin awesome and has many more options than my one liner custom alias had! For instance you can open Xcode and selects the given line or you can open Xcode with a new empty file that hasn’t yet been saved.
I’m definitely gonna be using this tool from now on! I can also see it being used for automated testing as well…
comments powered by Disqus