Commit Graph

42 Commits

Author SHA1 Message Date
lksz 6b8bd711af Edit-MyScript supports -TypeData editing 2021-05-27 12:47:27 -04:00
lksz 84d533a210 format.ps1xml support + fixes
+ Get-DockerProcess modified to display volume mappings (Binds) as well
  as docker-compose project names.
+ Reload-MyScripts will look for *.format.ps1xml files in the profile.d
  directory and load the format data from it.
+ Get-DockerProcess output is typed and a TypeData.format.ps1xml file
  was added to the package
+ Added _ll alias for easy posix ls -la output.
+ config.files.json modified for better neovim support.
2021-05-27 11:48:00 -04:00
Gal Szkolnik 60825c92c8 Updated MyPackage code
Better handling of package creation/modification via Set-MyPackage
Update the szCondition class to include CmdletExists+AppExeExists
2021-05-20 14:15:58 -04:00
Gal Szkolnik c38785cbf5 Edit-MyScript fix for Windows/PS5.1
When calling Edit-TextFile wihtout explicitly specifying -Path, multiple
files in command line would be passed on to editor incorrectly, with the
-Path explicitly specified, this now works in all versions of PowerShell
2021-05-12 09:29:18 -04:00
lksz 877f9adb4e Introducing Where-Ask script
A pipeline filter that will ask for confirmation based on the
parameters
2021-05-08 17:47:15 -04:00
lksz 35fe3a156f Fixed startup issues
Fixed Package condition testing which would fail, but also made it more
verbose.
Fixed shell-loading-snippets because of the rename to Setup-ScriptEnv.
2021-04-27 17:41:00 -04:00
Gal Szkolnik 5b8f0ca309 Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts 2021-04-27 16:39:03 +00:00
Gal Szkolnik 171409437b Modified Setup process to be an opt-in, live type
Also minor fix to edit-textfile to accept Path named property as input

(cherry picked from commit 272d3f91af836d094d5e19a14fbfa06331677eda)
2021-04-27 16:34:19 +00:00
Gal Szkolnik 22aa3ba435 Improve performance of Package identification
Using -ListAvailable with Get-Command to ensure no module loading is
    attampeted while querying loaded commands.
    This improved performance when certain modules have not been
    loaded yet
2021-04-27 16:04:12 +00:00
lksz ac10608cc0 =Fixed oh-my-posh style verification for non Windows systems 2021-04-25 13:03:16 -04:00
lksz 499a86baa6 Added #TotalTime# option to Show-Progress Status 2021-04-22 16:51:42 +00:00
lksz 2f317c53f3 Formatting and agility
skip scoop in VSCode
Fix CovertFrom-TimeSpan to handle series and FieldName
2021-04-20 23:43:17 +00:00
lksz c9d13f5c4d package defintion improvements
Added CmdletExists and AppExeExists conditions
Cleanup of existing package description files
2021-04-16 17:07:00 +00:00
lksz 2b51f37cb7 Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts 2021-04-16 15:45:54 +00:00
lksz 870887a577 Progress improvements + Waiting with progress 2021-04-16 15:45:36 +00:00
lksz b1f612828f Style update for Non-ANSI environments 2021-04-16 15:44:50 +00:00
lksz@work b303fa0f88 Cleanup of basics to work in Win + fixes to bugs 2021-04-07 16:04:46 -04:00
lksz b558edacd9 Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts 2021-04-04 14:47:08 -04:00
lksz 8a93a0f123 git related improvements and implementations
+ Get-GitRepo - Clone or update a repo, with tag support
+ Get-GitHubReleaseTag - Grab tag from latest release page
+ Refresh-GitRepo - Stage all possible changes, discarding any
previously stageds changes
= GitHub repo is now git repo - as some code isn't GitHub specific
+ cat Alias for Get-Content
= Get-PossiblArguments improvement
= Invoke-WebDownload fix
= dcedit fixing bad argument processing
2021-04-04 14:42:29 -04:00
lksz 1c4bf033fb Added Pause and RandomString + some minor fixes 2021-04-02 22:58:01 +00:00
lksz 91199f7bcf =Testing for old version of PowerShellGet 2021-03-26 18:10:18 +00:00
lksz d441492cf0 Added DockerCompose completion + fixes 2021-03-23 01:06:49 -04:00
Gal Szkolnik b5b5702b17 Join-String dependency fix + Get-Path cleanup
If Join-String is missing, the 'string' module, if not existing will be
installed and then imported.
Get-Path produced an error when used with wildcard, fixed it with string
substituation.
Get-Path would output wildcard string when expansion didn't match, now
output will be blank.
2021-03-06 18:10:28 -05:00
lksz 4da3726760 Some modifications
Style default to slim theme
config updated to include bashrc
dcup, dcdown to work in parallel (supported by dco)
2021-02-22 14:58:49 -05:00
Gal Szkolnik c8869ae393 dco should handle yaml extensions on top of yml 2021-02-20 13:09:38 -05:00
lksz 22d1b7a1bc Updated Style and config for oh-my-posh v3 2021-02-19 20:03:48 -05:00
lksz 6d2a23ae04 Modify Setup, Path, added Get-MyModules
+ base/Get-MyModules added
* base/profile.d/Test-MyModules modified to use Get-MyModules
* Setup-Profile modified so that sudo witll preserve environment
* Get-Path fixed bug introduced in last commit, Get-Path would fail when
  file to be edited didn't exist
2021-02-19 19:22:46 -05:00
lksz 5dae2a2af5 Modified Get-Path with additonal switch -Expand
* Added -Expand to Get-Path
* Modified Edit-TextFile to utilize new -Expand switch
2021-02-19 15:19:42 -05:00
lksz 0e986cfaa7 Module loading upgrade
This all started because I wanted the UnixCompleters module and
initialization to move to the base.linux package.

* MyConfig.class modified to load from all modules
* Test-MyModules suppress empty entries
* removed unix entries from base/src/modules.json
+ created base.linux/src/modules.json
2021-02-18 12:27:50 -05:00
lksz 6c19a53518 Added zsys to myconfig 2021-02-18 11:00:27 -05:00
lksz f7df96c55d New commands + fixes
+ Get-Mount (mounts retuned as objects for easy filtering)
+ Get-RandomMacAddress (for easy MAC Address generation)
* Get-Path modified to resolve ~, also made it work with pipeline input
* Edit-TextFile streamlined by using modified Get-Path
* Added emacs and spacemacs to MyConfig
* dcup - attempt at cleaner output
+ added docker/profile.d/env.ps1 for default docker vars
2021-02-18 10:53:32 -05:00
lksz f947b0b3b4 Improvements and bug fixes
dcl, dcll and dcre were brokeen, fixed that
Invoke-WebDownload given a URL, automatically deduce the file file.
Get-GitHubReleaseAssets - Grab URLs from a GitHub release page.
Invoke-DockerCompose updated to display progress while waiting on
background jobs.
2021-02-10 18:26:48 -05:00
Gal Szkolnik 1672c384ad Package creation template and scoop package
Set-MyPackage has a template option that will create skelaton content
when a new package is created.
Add scoop package, so that refresh will occur automatically on
powershell launch if it hasn't been run in the past 3 hours.
2021-02-07 13:32:23 -05:00
lksz 449a297d8b Main ConvertTo-Zip with a few additions and fixes
+ ConvertTo-Zip, originally created to mass convert CBRs to CBZs
  It will only be avilable when 7-zip is available (7z executable)
  Features: Shows progress, can work recursively (preserving folder
  structure), knows to move completed files.
+ Show-Progress: Shorthand for common progress related output
  manipulation (calculation of completion based on time, or item count,
  and verbose output if needeed)
+ ConvertFrom-TimeSpan: string output from timespan, used by
  Show-Progress
+ Get-Path updated to be more efficient (no need for exception handling)
+ PathProcessingFunctions loads a utility function GetShellSafePath
* Repair-Permissions added some status reporting
2021-01-29 18:26:39 -05:00
lksz 6549d8683d Some general shortcuts
DockerCompose, Edit AdditionalFiles shortcut #/, #tr and #lsi created
Set-MyPackage -LocalUser / -LocalHost shorthand.
2021-01-23 21:25:39 -05:00
lksz c453e5bdea Fixing the shell-loading-snippets and the editor 2021-01-14 21:31:31 -05:00
lksz b8c343d908 myconfig updated
better handling of vimrc
fix: shrc duplicate conflicting entries
2021-01-14 11:50:36 -05:00
lksz 24b5e928d0 docker and docker-compose commands
Invoke-DockerCompose which will be the basis of all other future dc
prefixed commands (which currently contains to much copy-pasted code)
2021-01-13 01:02:37 -05:00
lksz@work 4cec655429 Fixes to packagesz class code and the win package 2020-12-06 01:18:12 +02:00
lksz (@amnon) 8b2a4ca0cb Tweaks and fixes
Improved sz-df output of zfs mounts
Removed PowerShellCookbook dependecy in Packagesz class
2020-12-02 00:00:57 -05:00
Gal Szkolnik c6cc116564 Streamlined pwsz loading from Linux shells
Get-Path updated to support @ notation.
MyConfig class updated to resolve Paths before testing.
MyScript class will look recursivley - this might need to change again.
config.files.json updated to support shell-loading-snippets
shell-loading-snippets added, with single line of code to inject into
startup shell scripts (.zshrc, .bashrc, .shrc)
2020-12-01 23:31:42 -05:00
lksz 42b39f4e25 Introducing Packages
Major Overhaul with Breaking Changes
split into packaged, default behavior moved into 'base' package
each package has a json package description file with criteria for
loading

Modified Setup-Profile to refer to 'base' package path for auto loading

moved Linux aliases and command to 'base.linux' package
created 'docker' package to address docker supported systems

modified Get-MyScripts, Edit-MyScripts and Reload-MyScripts accordingly.

Dropped -System and sys.*, package json conditions will take care of it.

Supplied command to create/edit package json files:
  - New-MyPackage
  - Add-PackageCondition
  - Set-MyPackage
2020-11-25 00:46:33 -05:00