feat: 支持在 Find Everywhere 中快速打开本地终端

This commit is contained in:
hstyi
2025-01-07 11:06:38 +08:00
committed by hstyi
parent 7f40a67c28
commit 9d6fd7871b
4 changed files with 21 additions and 0 deletions

View File

@@ -15,6 +15,24 @@ class QuickCommandFindEverywhereProvider : FindEverywhereProvider {
list.add(CreateHostFindEverywhereResult())
}
// Local terminal
list.add(ActionFindEverywhereResult(object : AnAction(
I18n.getString("termora.find-everywhere.quick-command.local-terminal"),
Icons.terminal
) {
override fun actionPerformed(evt: ActionEvent) {
ActionManager.getInstance().getAction(Actions.OPEN_HOST)
?.actionPerformed(
OpenHostActionEvent(
this, Host(
name = name,
protocol = Protocol.Local
)
)
)
}
}))
// SFTP
list.add(ActionFindEverywhereResult(object : AnAction("SFTP", Icons.fileTransfer) {
override fun actionPerformed(evt: ActionEvent) {