Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying the output for the first run #2

Closed
th0th opened this issue Mar 5, 2023 · 1 comment
Closed

Displaying the output for the first run #2

th0th opened this issue Mar 5, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@th0th
Copy link

th0th commented Mar 5, 2023

Greetings Mark, thanks for making this available 💐

Is there a way to display the output for the initial run? E.g.

Get-ChildItem | Watch-Command -Continuous

waits for directory contents to change before displaying anything.

@markwragg
Copy link
Owner

Hi @th0th,

I have just added a -PassThru switch to the command, which then returns the initial result as you requested:

Get-ChildItem | Watch-Command -Continuous -PassThru

This is published in the PowerShell Gallery as version 1.0.30, so you should just be able to do Update-Module Watch to get the change if you installed via the Gallery.

Let me know if you find any issues with it.

Thanks for the suggestion!

Mark

@markwragg markwragg added the enhancement New feature or request label Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants