RobertoMachorro / Moped

A general purpose text editor, small and light.
https://roberto.machorro.net/Moped/
GNU General Public License v3.0
90 stars 8 forks source link

Add CLI shortcut to open Moped from Terminal #23

Closed jlumbroso closed 8 months ago

jlumbroso commented 3 years ago

I like being able to open a file from the terminal, so I have created this global shortcut:

moped(){
   open -a "/Applications/Moped.app/Contents/MacOS/Moped" "$@"
}

in my ~/.zprofile but there are other ways to solve this that don't require editing shell config, like creating a binary file moped putting it in $PATH and have it:

#!/bin/zsh
open -a "/Applications/Moped.app/Contents/MacOS/Moped" "$@"

assuming Moped.app is directly in Applications.

RobertoMachorro commented 8 months ago

Thanks for the tip! I have a similar script that iterates among all files in the command line, sometimes open eats up entries. See the bottom of the following blog:

https://roberto.machorro.net/projects/2019/08/25/moped-released-appstore.html

RobertoMachorro commented 8 months ago

Nothing further on this issue, closing.