Watfaq / PowerSession

Record a Session in PowerShell
MIT License
152 stars 9 forks source link

Update help text #13

Closed rashil2000 closed 3 years ago

rashil2000 commented 3 years ago

Firstly thanks for creating this! Works like a charm!

I see that PowerSession now supports cmd and pwsh through the --command parameter(#4), but this option is not shown in the help text. It would make its discovery easier.

Also, on a side note, when I do powersession play hello2.txt and the file hello2.txt doesn't exist, PowerSession just dumps out a stacktrace. It'd be better if it just said 'File not found'.

Cheers!

ibigbug commented 3 years ago

Thanks for the posting.

the help text can be checked this way and this is how https://github.com/dotnet/command-line-api works. added example in README.

PS C:\Users\i\RiderProjects\PowerSession\PowerSession.Cli\bin\Release\netcoreapp3.0\win-x64\publish> .\PowerSession.exe rec -h
rec:
  Record and save a session

Usage:
  PowerSession rec [options] <file>

Arguments:
  <file>    The filename to save the record

Options:
  -c, --command <command>    The command to record, default to be powershell.exe
ibigbug commented 3 years ago

also please check out the latest release for handling the file not found exception https://github.com/ibigbug/PowerSession/releases/tag/release-v1.4.1

rashil2000 commented 3 years ago

Oops, sorry, my bad, I was just checking by doing powersession --help. Thanks for the quick reply!