From 51b66714c5bfa74bdd91a7047069ca1f768c5526 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Wed, 13 May 2020 22:38:22 +0000 Subject: [PATCH] Small update to powershell section in dev manual. - Fix pkill function. - Give more example of comma separating arguments. Signed-off-by: Rafael Kitover --- DEVELOPER-MANUAL.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/DEVELOPER-MANUAL.md b/DEVELOPER-MANUAL.md index 120696f0..8f030f56 100644 --- a/DEVELOPER-MANUAL.md +++ b/DEVELOPER-MANUAL.md @@ -309,7 +309,7 @@ function pgrep { } function pkill { - pgrep $args | select processid | stop-process + pgrep $args | %{ stop-process $_.processid } } function taskslog { @@ -521,14 +521,20 @@ vim undo files: gci -rec .*un~ | ri ``` -You will notice that `Remove-Item` (`rm, ri`) does not take multiple space -separated items, you must separate them by commas, eg.: +You will notice that cmdlets like `Remove-Item` (`rm`, `ri`), `Copy-Item` +(`cp`, `cpi`) etc. do not take multiple space separated items, you must +separate them by commas, eg.: ```powershell -1..4 | %{ni foo$_; ni bar$_} +1..4 | %{ni foo$_, bar$_} +mkdir tmpdir +cpi foo*, bar* tmpdir 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: ```powershell