generated from JetBrains/intellij-platform-plugin-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ext-terminal): add ShellSuggestContext class and documentation #…
…1235
- Loading branch information
Showing
4 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
layout: default | ||
title: Shell Suggest | ||
parent: Basic Features | ||
nav_order: 12 | ||
permalink: /features/refactoring | ||
--- | ||
|
||
## Default context | ||
|
||
```kotlin | ||
data class ShellSuggestContext( | ||
val question: String, | ||
val shellPath: String, | ||
val cwd: String, | ||
// today's date like 20240322 | ||
val date: String = SimpleDateFormat("yyyyMMdd").format(Date()), | ||
// operating system name | ||
val os: String = System.getProperty("os.name") | ||
) | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
exts/ext-terminal/src/main/kotlin/cc/unitmesh/terminal/ShellSuggestContext.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package cc.unitmesh.terminal | ||
|
||
import java.text.SimpleDateFormat | ||
import java.util.* | ||
|
||
data class ShellSuggestContext( | ||
val question: String, | ||
val shellPath: String, | ||
val cwd: String, | ||
// today's date like 20240322 | ||
val date: String = SimpleDateFormat("yyyyMMdd").format(Date()), | ||
// operating system name | ||
val os: String = System.getProperty("os.name") | ||
) |