stdlib: add termux clipboard suport for clip (#9334)

# Description

Added `termux-clipboard-set` to `std clip`
This commit is contained in:
ShinyZero0 2023-06-02 00:26:22 +03:00 committed by GitHub
parent 55689ddb50
commit 2ac63910f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,6 +106,7 @@ def check-clipboard [
# - xclip on linux x11
# - wl-copy on linux wayland
# - clip.exe on windows
# - termux-api on termux
#
# Examples:
# put a simple string to the clipboard, will be stripped to remove ANSI sequences
@ -167,6 +168,10 @@ export def clip [
check-clipboard pbcopy --system macOS
$input | pbcopy
},
"android" => {
check-clipboard termux-clipboard-set --system Termux
$input | termux-clipboard-set
},
_ => {
error make --unspanned {
msg: $"(ansi red)unknown_operating_system(ansi reset):