Various additions
dps is now an Alias to Get-DockerProcess Get-DockerProcess has been cleaned up and search features added to it. Added FromPowerShellCookbook, which loads a piece of code from the module, but does not load the entire module. MyConfig now includes ansible and tmux configs, also added -sudo switch Get-PlexInfo added, with ability to read directly from Server Invoke-ViaAnsible modified - cleaned up output Added -Force to Edit-DockerCompose dcc modified to read from raw log (which allows filtering by source, and has timestamps)
This commit is contained in:
parent
59a2949268
commit
ac9c5ed352
10 changed files with 80 additions and 20 deletions
21
profile.d/FromPowerShellCookbook.ps1
Normal file
21
profile.d/FromPowerShellCookbook.ps1
Normal file
|
@ -0,0 +1,21 @@
|
|||
# PowerShell Cookbook has a lot of code there, I'm only interested in
|
||||
# the Add-ObjectCollector which adds an overloaded Out-Default version,
|
||||
# which stores a history of output objects.
|
||||
# One major problem with loading this from the module, is that when the
|
||||
# module is removed the shell BREAKS.
|
||||
#
|
||||
# The code below, makes sure the module is removed, and then imports
|
||||
# only the Add-ObjectCollector code from it.
|
||||
# All I really want is the Out-Default function created by
|
||||
# Add-ObjectCollector, and so, I'll also remove the function once done.
|
||||
|
||||
if( Get-Module PowerShellCookbook ) {
|
||||
Remove-Module PowerShellCookbook
|
||||
|
||||
Import-Module PowerShellCookbook -Cmdlet Add-ObjectCollector
|
||||
}
|
||||
#
|
||||
. Get-Command Add-ObjectCollector SilentlyContinue | ForEach-Object {
|
||||
Add-ObjectCollector
|
||||
Get-Item function:/Add-ObjectCollector | Remove-Item
|
||||
}
|
|
@ -12,6 +12,7 @@ class MyConfig { #: System.Management.Automation.IValidateSetValuesGenerator {
|
|||
'sz-shrc' = '~/.sz.shrc.sh'
|
||||
'sz-rc-all' = '#sz-aliases-sh', '#sz-local-rc', '#sz-shrc', '#sz-zshrc', '#zshrc'
|
||||
'tmux' = '~/.tmux.conf', '~/.byobu/.tmux.conf'
|
||||
'ansible' = '/etc/ansible/ansible.cfg', '/opt/ansible/ansible.cfg'
|
||||
}
|
||||
}
|
||||
static [string[]] GetConfigPaths([string[]]$ConfigNames,[switch]$Force) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue