I find myself typing these commands a lot (on Mac):
$ touch example.txt
$ open example.txt
I was wondering if there was an easier way to do this. I tried this:
$ alias t='touch $0 && open $0’
But I got this:
$ t awef.txt
touch: illegal option -- b
Note: I do not want to empty the file. If the file already has content, I just want to open it.