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