Adding a script to MacOS finder contextual menu

后端 未结 3 1112
礼貌的吻别
礼貌的吻别 2020-12-24 05:08

I want to add an option to the finder context menu that calls hg add %1 with %1 being the full path of the selected file in finder.
Of course there are more

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 05:59

    Open Automator, create a custom workflow. From Library choose Utilites, then drag and drop Run shell script to the workflow. Set Pass input to As arguments. Write in your script: hg add $1. Then File menu->Save as a Plugin, specify the name, choose plugin for Finder, Save. Right click on the file, choose More->Autamator->.

提交回复
热议问题