All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.term.TermXDefault.kt Maven / Gradle / Ivy

There is a newer version: 0.0.87
Show newest version
@file:Suppress("ClassName")

package pl.mareklangiewicz.kommand.term

import pl.mareklangiewicz.annotations.DelicateApi
import pl.mareklangiewicz.kommand.*

/** [debian packages providing x-terminal-emulator](https://packages.debian.org/stable/virtual/x-terminal-emulator) */
@OptIn(DelicateApi::class)
fun termXDefault(kommand: Kommand? = null, init: TermXDefault.() -> Unit = {}) = TermXDefault().apply {
  init()
  kommand?.let { -KOptL(""); nonopts.addAll(kommand.toArgs()) }
  // I assume the "--" separator support. It works at least for gnome-term and kitty,
  // and it clearly separates options from command (and its options) to run.
}

/** [debian packages providing x-terminal-emulator](https://packages.debian.org/stable/virtual/x-terminal-emulator) */
@DelicateApi("Requires x-terminal-emulator; different terminals accept different options.")
data class TermXDefault(
  override val opts: MutableList = mutableListOf(),
  override val nonopts: MutableList = mutableListOf(),
) : KommandTypical {
  override val name get() = "x-terminal-emulator"
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy