Document the Get-Clipboard verbose message when the system clipboard is unavailable

オープン 初心者向け
#13,431 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
powershell
領域
documentation

調査の方向性

reference/7.7/Microsoft.PowerShell.Management/Get-Clipboard.mdを読み、プラットフォームごとの動作と詳細出力がどのように記載されているか確認してください。システムのクリップボードを利用できない場合、Get-ClipboardはPowerShell内部のクリップボードにフォールバックし、これはSet-Clipboardによってのみ内容が設定されること、また-Verboseがこのフォールバックを報告することを説明する注記を追加してください。記事でこの動作が説明され、既定の出力が引き続き明確であれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."

Summary

Document the new verbose message that Get-Clipboard emits when it can't access the system clipboard and falls back to PowerShell's internal clipboard.

On Linux and macOS, Get-Clipboard reads the system clipboard through xclip or pbpaste. On unsupported platforms, or when that tool isn't installed, the cmdlet silently falls back to PowerShell's internal clipboard, which only Set-Clipboard populates. Users then see content that doesn't match their desktop clipboard, or no content at all, with no explanation.

PowerShell/PowerShell#26838 changes this so the fallback is reported on the verbose stream:

Get-Clipboard -Verbose
VERBOSE: The system clipboard is not available. Get-Clipboard falls back to PowerShell's internal clipboard, which is populated only by Set-Clipboard.

Default output is unchanged; the message only appears with -Verbose.

Details

  • The message is written with WriteVerbose, so it does not affect the success output stream or non-verbose runs. This keeps backward compatibility for scripts and for environments that intentionally run without a clipboard tool.
  • Windows behavior is unchanged; the fallback path only exists on Unix and on unsupported platforms.
  • Suggested documentation: a note in the Get-Clipboard article explaining the internal-clipboard fallback and how -Verbose reveals it. Mentioning Set-Clipboard as the only way to populate the internal clipboard would help users understand the behavior.

Articles

  • reference/7.7/Microsoft.PowerShell.Management/Get-Clipboard.md

Related Source Pull Requests

Related Source Issues

  • PowerShell/PowerShell#26838
主要言語
PowerShell
スター
2.6k
フォーク
1.7k
平均マージ
3時間 49分
マージ済み PR(30日)
5

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MicrosoftDocs/PowerShell-Docs のほかの issue

MicrosoftDocs/PowerShell-Docs の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。