mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
[git-term] Add an initial terminal git autocompletion specification
GitOrigin-RevId: 74057c98261777f7b260e13c15a706ef388e48d5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1a73332b29
commit
3322621879
@@ -90,5 +90,7 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.ide.newUiOnboarding" />
|
||||
<orderEntry type="module" module-name="intellij.platform.backend.observation" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util.coroutines" />
|
||||
<orderEntry type="module" module-name="intellij.terminal" />
|
||||
<orderEntry type="module" module-name="intellij.terminal.completion" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
<content>
|
||||
<module name="intellij.vcs.git/newUiOnboarding"/>
|
||||
<module name="intellij.vcs.git/terminal"/>
|
||||
</content>
|
||||
|
||||
<actions>
|
||||
|
||||
9
plugins/git4idea/resources/intellij.vcs.git.terminal.xml
Normal file
9
plugins/git4idea/resources/intellij.vcs.git.terminal.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<idea-plugin package="git4idea.terminal">
|
||||
<dependencies>
|
||||
<plugin id="org.jetbrains.plugins.terminal"/>
|
||||
</dependencies>
|
||||
|
||||
<extensions defaultExtensionNs="org.jetbrains.plugins.terminal">
|
||||
<commandSpecsProvider implementation="git4idea.terminal.GitCommandSpecsProvider"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package git4idea.terminal
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus.Experimental
|
||||
import org.jetbrains.plugins.terminal.block.completion.spec.ShellCommandSpecConflictStrategy
|
||||
import org.jetbrains.plugins.terminal.block.completion.spec.ShellCommandSpecInfo
|
||||
import org.jetbrains.plugins.terminal.block.completion.spec.ShellCommandSpecsProvider
|
||||
|
||||
internal class GitCommandSpecsProvider : ShellCommandSpecsProvider {
|
||||
override fun getCommandSpecs(): List<ShellCommandSpecInfo> = listOf(
|
||||
ShellCommandSpecInfo.create(gitOverrideSpec, ShellCommandSpecConflictStrategy.OVERRIDE)
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("HardCodedStringLiteral")
|
||||
|
||||
package git4idea.terminal
|
||||
|
||||
import com.intellij.terminal.completion.spec.ShellCommandParserOptions
|
||||
import org.jetbrains.plugins.terminal.block.completion.spec.ShellCommandSpec
|
||||
|
||||
internal val gitOverrideSpec = ShellCommandSpec("git") {
|
||||
subcommands {
|
||||
// ...
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user