UNPKG

@liangshen/alfred-datagrip

Version:

*Alfred工作流,快速启动DataGrip软件中打开过的项目* *Alfred workflow for DataGrip*

14 lines (13 loc) 433 B
import alfred, {OutputItem} from "@liangshen/alfred"; import {getRecentProjects} from "@liangshen/jetbrains" const items: OutputItem[] = [{arg: '', title: 'Open', subtitle: ''}] try { const recentProjects = await getRecentProjects('DataGrip'); items.push(...recentProjects.reverse().map(i => ({ arg: i.path, title: i.name, subtitle: i.path }))); } catch (e) { } alfred.output({items}, ['title']);