Create a gist now

Instantly share code, notes, and snippets.

Better `xed` — the CLI tool for Xcode is handy, but has a few issues that get in the way. For starters, if the file doesn't exist, the builtin `x\ed` won't create a new one. I also noticed that Xcode will open a symlink and let you edit, but then gets really angry when it tries to save. So…this.
alias xed='function _xed() { [ ! -f $1 ] && touch $1; xed `python -c "import os,sys;print os.path.realpath(sys.argv[1])" $1`; };_xed'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment