Small update to powershell section in dev manual.

- Fix pkill function.

- Give more example of comma separating arguments.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-05-13 22:38:22 +00:00
parent b4aeab689a
commit 51b66714c5
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 10 additions and 4 deletions

View File

@ -309,7 +309,7 @@ function pgrep {
} }
function pkill { function pkill {
pgrep $args | select processid | stop-process pgrep $args | %{ stop-process $_.processid }
} }
function taskslog { function taskslog {
@ -521,14 +521,20 @@ vim undo files:
gci -rec .*un~ | ri gci -rec .*un~ | ri
``` ```
You will notice that `Remove-Item` (`rm, ri`) does not take multiple space You will notice that cmdlets like `Remove-Item` (`rm`, `ri`), `Copy-Item`
separated items, you must separate them by commas, eg.: (`cp`, `cpi`) etc. do not take multiple space separated items, you must
separate them by commas, eg.:
```powershell ```powershell
1..4 | %{ni foo$_; ni bar$_} 1..4 | %{ni foo$_, bar$_}
mkdir tmpdir
cpi foo*, bar* tmpdir
ri foo*, bar* ri foo*, bar*
ri -rec tmpdir
``` ```
Comma separated items is the list syntax on powershell.
The equivalent of `rm -rf` to delete a directory is: The equivalent of `rm -rf` to delete a directory is:
```powershell ```powershell