Add Add-Runtime to PowerShell
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
Set-Alias ps Get-Process
|
||||
Set-Alias kill Stop-Process
|
||||
|
||||
function uptime() {
|
||||
((Get-Date) - (gcim Win32_OperatingSystem).LastBootUpTime)
|
||||
# ex: ps *mosh* | Add-Runtime | ft Name,StartTime,Status
|
||||
|
||||
filter Add-Runtime {
|
||||
$_ | Add-Member -PassThru -NotePropertyName Status -NotePropertyValue (New-TimeSpan -Start $_.StartTime)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -x
|
||||
set -o
|
||||
|
||||
PWSH_PROFILE_NAME=Microsoft.PowerShell_profile.ps1
|
||||
PWSH_PROFILE_PATH=$HOME/.config/powershell/
|
||||
|
||||
Reference in New Issue
Block a user