3 ms·
`open` is one I use all the time. I love that simple command. alias tab='open . -a iterm' alias phpstorm='open -a "PhpStorm"' alias smerge='open -a
by apocalyptic0n3 3y ago
`open` is one I use all the time. I love that simple command.
alias tab='open . -a iterm'
alias phpstorm='open -a "PhpStorm"'
alias smerge='open -a "Sublime Merge"'
etc. I use those more than I do the Open/Recents dialogs in the respective apps.
- baliex 3y agoTo open a new finder window in the current directory in a terminal: alias finder='open .'
- Kyuuketsuki 3y agoOne flag also not mentioned is -n, which allows you to run the same application in more than one instance. Historically the single most used utility for me, though the number of applications that have had design problems bad enough to warrant it has gone down.
- Sujeto 3y agoI made a script to open files with rofi https://github.com/davatorium/rofi https://github.com/davatorium/rofi Looks like this: https://i.imgur.com/Hm9TGeV.jpg https://i.imgur.com/Hm9TGeV.jpg In a vscode terminal I just use the alias "o" and it opens that at the correct location, then I can navigate and pick a file to open in the editor.
- movedx 3y ago> alias tab='open . -a iterm' But if you just open a new tab, you'll be in the same $CWD in the new tab? Am I missing some trick here?
- andelink 3y agoIn your iterm profile settings, you can configure new tabs to go to either $HOME, $CWD, or a fixed specific directory. I've configured new windows and tabs to $HOME, but new split panes $CWD.
- apocalyptic0n3 3y agoI forget that's an option. I really dislike that and prefer for new tabs to open in my home directory. So having my `tab` alias that I use a couple times a week and opening the other 100 tabs in my home directory fits my workflow.
- jonpalmisc 3y agoSublime Text and Sublime Merge actually ship with these CLI utilities by default, which have some additional features: $ fd 's(merge|ubl)$' /Applications/Sublime* /Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl
- apocalyptic0n3 3y agoI knew of (and use) `subl` but was unaware they provided their own `smerge`. I'll delete my own alias in favor of that. Thanks!
- varenc 3y ago`open -a ...` tab completion has been horribly slow for years because Apple hasn’t updated their completion definition. I replied with a work around on this SO post: https://stackoverflow.com/a/63097652 https://stackoverflow.com/a/63097652