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

Abierto Apto para principiantes
#13,431 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
88/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
powershell

Línea de trabajo

Lee reference/7.7/Microsoft.PowerShell.Management/Get-Clipboard.md y comprueba cómo documenta el comportamiento de la plataforma y la salida detallada. Añade una nota que explique que, cuando el portapapeles del sistema no está disponible, Get-Clipboard recurre al portapapeles interno de PowerShell, que solo se rellena mediante Set-Clipboard, y que -Verbose informa de este recurso. Se considera terminado cuando el artículo describe este comportamiento y la salida predeterminada sigue siendo clara.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
PowerShell
Estrellas
2.6k
Forks
1.7k
Merge medio
3 h 49 min
PR fusionados (30 d)
5

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MicrosoftDocs/PowerShell-Docs

Todos los issues de MicrosoftDocs/PowerShell-Docs

Issues similares

Más issues de Documentation

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.