本地终端和已保存主机的远程终端里,剪贴板只有图、没有文字时,⌘V / Ctrl+Shift+V 或右键粘贴不再丢掉图片。图存成 PNG 等文件后,把路径当作文字粘进输入行,给终端里的 Agent 读。 本地写到系统临时目录 shellrs-pastes/(目录 0700、文件 0600),超过 20 个或超过 7 天的旧文件会清掉。已保存的主机另开一条 SFTP 把文件写到远端 /tmp/shellrs-paste-….png,连上后再粘路径;登录要问答就直接失败,不弹框。超过 8 MB 拒绝。外部连接和临时连接提示不支持。剪贴板里有文字时仍粘文字。
62 lines
2.0 KiB
YAML
62 lines
2.0 KiB
YAML
# The Windows build, which the Macs this is developed on cannot compile:
|
||
# the whole crate through clippy, the external CLI's tests, including the
|
||
# named pipe between two processes, the updater's, and the local SFTP pane's
|
||
# paths (std canonicalizes to `\\?\C:\…` there).
|
||
#
|
||
# A push runs it only when it touches code that differs on Windows (the
|
||
# files with `cfg(windows)` and friends), the build script or the
|
||
# dependencies. Windows code added to another file goes in this list too;
|
||
# until then, run it by hand (Actions › windows › Run workflow). Tags never
|
||
# run it: the release workflow builds Windows itself.
|
||
name: windows
|
||
|
||
on:
|
||
push:
|
||
branches: ["**"]
|
||
paths:
|
||
- "src/cli/**"
|
||
- "src/analytics/**"
|
||
- "src/update/**"
|
||
- "src/app/paths.rs"
|
||
- "src/app/window_hiding.rs"
|
||
- "src/main.rs"
|
||
- "src/bin/**"
|
||
- "src/ssh/connection.rs"
|
||
- "src/sftp/download.rs"
|
||
- "src/sftp/model.rs"
|
||
- "src/sftp/upload.rs"
|
||
- "src/sftp/sync.rs"
|
||
- "src/credential/credential_dialog.rs"
|
||
- "src/settings/settings_panel.rs"
|
||
- "src/app/shortcuts.rs"
|
||
- "src/terminal/paste_image.rs"
|
||
- "src/workspace/window_state.rs"
|
||
- "src/testing.rs"
|
||
- "tests/cli_bin.rs"
|
||
- "build.rs"
|
||
- "Cargo.toml"
|
||
- "Cargo.lock"
|
||
- "rust-toolchain.toml"
|
||
workflow_dispatch:
|
||
|
||
jobs:
|
||
cli:
|
||
runs-on: windows-latest
|
||
timeout-minutes: 90
|
||
env:
|
||
CARGO_TERM_COLOR: always
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
# rust-toolchain.toml picks the toolchain; this installs it with the
|
||
# components it lists before the cache key is computed.
|
||
- run: rustup toolchain install
|
||
- uses: Swatinem/rust-cache@v2
|
||
# In case aws-lc-sys wants to assemble rather than use its prebuilt
|
||
# objects.
|
||
- uses: ilammy/setup-nasm@v1
|
||
- run: cargo clippy --all-targets -- -D warnings
|
||
- run: "cargo test --lib cli::"
|
||
- run: "cargo test --lib update::"
|
||
- run: "cargo test --lib sftp::tests::local_listing"
|
||
- run: cargo test --test cli_bin
|