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:
parent
b4aeab689a
commit
51b66714c5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue