From 4876ff32b23cf132322654a72256c01ce5198728 Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Tue, 18 Mar 2025 19:08:28 +1100 Subject: [PATCH 01/10] first commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8f2ec72..50fb395 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Some zsh completion files for macOS specific commands and third party tools. Pull requests and contributions are welcome! +We will see. + ## Setup and Installation To use mac-zsh-completions on your Mac, follow these steps: From 3a504d8fcc767436b028cffba41b0490af0a9abc Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Thu, 20 Mar 2025 13:19:09 +1100 Subject: [PATCH 02/10] completion for quickpkg --- completions/_quickpkg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 completions/_quickpkg diff --git a/completions/_quickpkg b/completions/_quickpkg new file mode 100755 index 0000000..d3851b1 --- /dev/null +++ b/completions/_quickpkg @@ -0,0 +1,20 @@ +#compdef quickpkg + +function _quickpkg () { + + _arguments -S \ + "--help[Show help]" \ + "--version[Show version]" \ + "--scripts[folder of scripts]::folder:_files" \ + "--preinstall[preinstall script]::file:_files" \ + "--postinstall[postinstall script]::file:_files" \ + "--install-location[install location]:folder:_files" \ + "--ownership[ownership]:::_values 'passed to pkgbuild' 'recommended' 'preserve' 'preserve-other'" \ + "--output[output folder]::folder:_files" \ + "--clean[remove temporary files (default)]" \ + "--no-clean[do not remove temporary files]" \ + "--relocatable[sets BundleIsRelocatable to true]" \ + "--sign[sign package with identity]" \ + "--keychain[use keychain]" \ + "--cert[certificate name]" \ +} From 0a73972ad721b9b1ec12f7b2284a5ebd9b78b594 Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Thu, 20 Mar 2025 13:43:42 +1100 Subject: [PATCH 03/10] added filename completion and alternatives for clean and relocatable --- completions/_quickpkg | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/completions/_quickpkg b/completions/_quickpkg index d3851b1..b4efb60 100755 --- a/completions/_quickpkg +++ b/completions/_quickpkg @@ -1,7 +1,6 @@ #compdef quickpkg function _quickpkg () { - _arguments -S \ "--help[Show help]" \ "--version[Show version]" \ @@ -11,10 +10,12 @@ function _quickpkg () { "--install-location[install location]:folder:_files" \ "--ownership[ownership]:::_values 'passed to pkgbuild' 'recommended' 'preserve' 'preserve-other'" \ "--output[output folder]::folder:_files" \ - "--clean[remove temporary files (default)]" \ - "--no-clean[do not remove temporary files]" \ - "--relocatable[sets BundleIsRelocatable to true]" \ + "(--no-clean)--clean[remove temporary files (default)]" \ + "(--clean)--no-clean[do not remove temporary files]" \ + "(--no-relocatable)--relocatable[sets BundleIsRelocatable to true]" \ + "(--relocatable)--no-relocatable[sets BundleIsRelocatable to false]" \ "--sign[sign package with identity]" \ "--keychain[use keychain]" \ "--cert[certificate name]" \ + "*::filename:_files" } From 908373f923c06a4a21bd3a52fc67428e5fbd02be Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Thu, 20 Mar 2025 13:55:26 +1100 Subject: [PATCH 04/10] added -v et. al. --- completions/_quickpkg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/completions/_quickpkg b/completions/_quickpkg index b4efb60..321a0ee 100755 --- a/completions/_quickpkg +++ b/completions/_quickpkg @@ -17,5 +17,9 @@ function _quickpkg () { "--sign[sign package with identity]" \ "--keychain[use keychain]" \ "--cert[certificate name]" \ + "(-v -vv -vvv)--verbosity[amount of logging]" \ + "(--verbosity -vv -vvv)-v[small amount of logging]" \ + "(--v --verbosity -vvv)-vv[medium amount of logging]" \ + "(-vv -vv --verbosity)-vvv[chatty amount of logging]" \ "*::filename:_files" } From a9c917d8701c1f437bf8711447a1e3e0014816ef Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Thu, 20 Mar 2025 14:05:15 +1100 Subject: [PATCH 05/10] fixed problem with README --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 50fb395..8f2ec72 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ Some zsh completion files for macOS specific commands and third party tools. Pull requests and contributions are welcome! -We will see. - ## Setup and Installation To use mac-zsh-completions on your Mac, follow these steps: From e0a69c53b98ec4b3a830dc2691a62ec611f716ed Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Thu, 20 Mar 2025 14:43:22 +1100 Subject: [PATCH 06/10] completion for dsenableroot --- .gitignore | 2 ++ completions/_dsenableroot | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 completions/_dsenableroot diff --git a/.gitignore b/.gitignore index 9bea433..3ee3221 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .DS_Store +.vscode +.gitignore diff --git a/completions/_dsenableroot b/completions/_dsenableroot new file mode 100644 index 0000000..d3215f9 --- /dev/null +++ b/completions/_dsenableroot @@ -0,0 +1,11 @@ +#compdef dsenableroot + +function _dsenableroot () { + _arguments -S \ + "-d[Disable root user]" \ + "-u[username of admin user]:username:_users" \ + "-p[password of admin user]:password:" \ + "-r[password of root user]:password:" \ + "-h[Show help]" \ + "-v[Show version]" \ +} From 0ba3ffd94f1002443f4f39dd5dd9b0efbc55f796 Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Fri, 21 Mar 2025 13:49:32 +1100 Subject: [PATCH 07/10] added Nilson Holgers 4 completions to todo.md and removed launchctl and tmutil from checklist --- todo.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/todo.md b/todo.md index 60f0cd2..6772da7 100644 --- a/todo.md +++ b/todo.md @@ -3,7 +3,6 @@ - [ ] dscl - [ ] dseditgroup - [ ] dsenableroot -- [ ] launchctl - [x] jamf - [ ] pkgbuild - [ ] productbuild @@ -31,14 +30,17 @@ - [ ] startosinstall - [ ] createinstallmedia - [ ] tccutil -- [ ] tmutil - [ ] quickpkg - [ ] diskutil - [ ] fdesetup - [x] see - [ ] app-sso - +*available at https://github.com/nilsonholger/osx-zsh-completions* +- launchctl +- systemsetup +- tmutil +- xattr *zsh 5.3 (High Sierra/Mojave)* From ca40c71ee845e55a9f9985c9b7081f790761380f Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Tue, 25 Mar 2025 13:30:29 +1100 Subject: [PATCH 08/10] bbedit completion --- completions/_bbdiff | 23 ++++++++++++++++++ completions/_bbfind | 23 ++++++++++++++++++ completions/_bbresults | 9 +++++++ todo.md | 55 +++++++++++++++++++++--------------------- 4 files changed, 82 insertions(+), 28 deletions(-) create mode 100644 completions/_bbdiff create mode 100644 completions/_bbfind create mode 100644 completions/_bbresults diff --git a/completions/_bbdiff b/completions/_bbdiff new file mode 100644 index 0000000..fdadc81 --- /dev/null +++ b/completions/_bbdiff @@ -0,0 +1,23 @@ +#compdef bbdiff + +_bbdiff() { + _arguments -S \ + "--case-sensitive[case sensitive comparison]" \ + "--compare-hidden-folders[compare hidden folders]" \ + "--flatten-folders[consider folder hierarchies flat]" \ + "--help[show help]" \ + "--ignore-curly-quotes[all quotes are equal]" \ + "--ignore-extra-spaces[ignore extra spaces]" \ + "--ignore-leading-spaces[ignore leading spaces]" \ + "--ignore-trailing-spaces[ignore trailing spaces]" \ + "--ignore-spaces[ignore spaces]" \ + "--resume[resume a previous app]" \ + "--reverse[reverse the order of the file arguments]" \ + "(-V --short-version)""{-V --shortversion}""[display the short version number]" \ + "(-v --version)""{-v,--version}""[display the version number]" \ + "--show-identical-files[show identical files]" \ + "--skip-shielded-folders[skip shielded folders]" \ + "--text-files-only[compare only text files]" \ + "--wait[wait for the comparison to finish]" \ + "*::filename:_files" +} diff --git a/completions/_bbfind b/completions/_bbfind new file mode 100644 index 0000000..a6ff1e2 --- /dev/null +++ b/completions/_bbfind @@ -0,0 +1,23 @@ +#compdef bbfind + +_bbfind(){ + _arguments -S \ + "(-V --short-version)""{-V --shortversion}""[show the short version]" \ + "(-v --version)""{-v,--version}""[display the version number]" \ + "-n, --case-sensitive[case sensitive comparison]" \ + "-g, --grep[use grep patterns]" \ + "-w, --match-word[match whole words]" \ + "-x, --extract[extract matching lines]" \ + "-r[replacement pattern]:pattern" \ + "-R,--no-nested-folders[no recursion]" \ + "-I,--search-invisible-folders[search invisible folders]" \ + "--all-file-types[search all file types]" \ + "-C,--no-compressed-files[no searching compressed files]" \ + "--name-pattern[search by name pattern]:pattern" \ + "--gui[open results in BBEdit window]" \ + "-c,--count[show count of matches]" \ + "-Z,--null["null separating entries"]" \ + "-E, --editor-commands[commands to BBEdit]" \ + "-0["expect nulls not newlines] + +} diff --git a/completions/_bbresults b/completions/_bbresults new file mode 100644 index 0000000..f7061eb --- /dev/null +++ b/completions/_bbresults @@ -0,0 +1,9 @@ +#compdef bbresults + +_bbresults() { + _arguments \ + "-p, --pattern[determine parsing-see man page]:::_values 'parsing pattern' 'default' 'flake8' 'grep' 'gcc' 'perl' 'ruby'" \ + "-n, --new-window[create new results window]" \ + "-0[separator is null]" \" + } + \ No newline at end of file diff --git a/todo.md b/todo.md index 6772da7..5f9f207 100644 --- a/todo.md +++ b/todo.md @@ -1,48 +1,47 @@ -- [x] desktoppr -- [ ] xattr + +- [ ] app-sso +- [ ] autopkg +- [ ] createinstallmedia +- [ ] diskutil +- [ ] diskutil - [ ] dscl - [ ] dseditgroup - [ ] dsenableroot -- [x] jamf +- [ ] dsimport +- [ ] fdesetup +- [ ] ioreg +- [ ] log - [ ] pkgbuild - [ ] productbuild -- [x] swift -- [x] xed -- [ ] xcodebuild -- [ ] xcrun (started) -- [x] bbedit -- [ ] bbdiff -- [ ] bbresults -- [ ] bbfind +- [ ] profiles - [ ] shellcheck -- [ ] dsenableroot +- [ ] startosinstall +- [ ] sysadminctl - [ ] sysctl -- [ ] ioreg -- [ ] profiles -- [x] plutil +- [ ] tccutil +- [ ] xcodebuild +- [ ] xcrun (started) - [x] PlistBuddy +- [x] bbdiff +- [x] bbedit +- [x] bbfind +- [x] bbresults +- [x] desktoppr - [x] installer -- [ ] diskutil -- [ ] dsimport -- [ ] log -- [ ] sysadminctl -- [ ] autopkg -- [ ] startosinstall -- [ ] createinstallmedia -- [ ] tccutil -- [ ] quickpkg -- [ ] diskutil -- [ ] fdesetup +- [x] jamf +- [x] plutil +- [x] quickpkg - [x] see -- [ ] app-sso +- [x] swift +- [x] xed *available at https://github.com/nilsonholger/osx-zsh-completions* + - launchctl - systemsetup - tmutil - xattr - *zsh 5.3 (High Sierra/Mojave)* - defaults From fcd613fa3b58a88e3ec2fc6482a972470c7af4a5 Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Wed, 26 Mar 2025 14:27:28 +1100 Subject: [PATCH 09/10] fixes for quickpkg and PlistBuddy --- completions/_PlistBuddy | 6 ++++-- completions/_quickpkg | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/completions/_PlistBuddy b/completions/_PlistBuddy index 3e1a516..cdc6960 100644 --- a/completions/_PlistBuddy +++ b/completions/_PlistBuddy @@ -1,9 +1,11 @@ #compdef PlistBuddy _PlistBuddy() { + + local commands="'Help' 'Clear' 'Print' 'Set' 'Add' 'Copy' 'Delete' 'Merge' 'Save'" _arguments \ - "-c[\"\" execute command, otherwise run in interactive mode]" \ + "-c[\"\" execute command, otherwise run in interactive mode]:value:_values 'command' $commands"\ "-x[output will be in the form of an xml plist where appropriate]" \ "-h[print the complete help info, with command guide]" \ "*::filename:_files" -} \ No newline at end of file +} diff --git a/completions/_quickpkg b/completions/_quickpkg index 321a0ee..afdd395 100755 --- a/completions/_quickpkg +++ b/completions/_quickpkg @@ -8,7 +8,7 @@ function _quickpkg () { "--preinstall[preinstall script]::file:_files" \ "--postinstall[postinstall script]::file:_files" \ "--install-location[install location]:folder:_files" \ - "--ownership[ownership]:::_values 'passed to pkgbuild' 'recommended' 'preserve' 'preserve-other'" \ + "--ownership[ownership]:value:_values 'passed to pkgbuild' 'recommended' 'preserve' 'preserve-other'" \ "--output[output folder]::folder:_files" \ "(--no-clean)--clean[remove temporary files (default)]" \ "(--clean)--no-clean[do not remove temporary files]" \ From ff44f6c8166b90b67608952440cd27bf80ea4814 Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Thu, 27 Mar 2025 14:20:25 +1100 Subject: [PATCH 10/10] added shellcheck and startosinstall --- completions/_shellcheck | 30 ++++++++++++++++++++++++++++++ completions/_startosinstall | 30 ++++++++++++++++++++++++++++++ todo.md | 2 +- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 completions/_shellcheck create mode 100644 completions/_startosinstall diff --git a/completions/_shellcheck b/completions/_shellcheck new file mode 100644 index 0000000..8d2fe15 --- /dev/null +++ b/completions/_shellcheck @@ -0,0 +1,30 @@ +#compdef shellcheck + +function _shellcheck () { + _arguments -S \ + "-a[Check sourced files, not just the specified ones]" \ + "--check-sourced[Check sourced files]" \ + "-C[enable colors in output]" :when:_values 'when' 'always' 'never' 'auto'" \ + "--color=[enable colors in output]" :when:_values 'when' 'always' 'never' 'auto' '' \ + "-i[only include these codes]" \ + "--include[only include these codes]" \ + "(-e --exclude)[exclude these codes]" \ + "--exclude[exclude these codes]" \ + "--extended-analysis=[enable extended analysis]" :boolean:_values 'analysis' 'true' 'false'" \ + "(-f --format=)[format output]" ::_values 'format' 'tty' 'gcc' 'checkstyle' 'diff' 'json1' 'json' 'quiet'" \ + "--list-optional=[list optional checks]" \ + "--norc=[do not use the user configuration file]" \ + "--rcfile[use the specified configuration file]::file:_files" \ + "(-o --enable=)[enable these optional checks]" \ + "(-P --source-path=)[add to source paths]::file:_files" \ + "(-s --shell=)[specify the shell to use]::_values 'shell' 'sh' 'bash' 'dash' 'ksh' 'busybox'" \ + "(-S --severity=)[set the minimum severity level] ::_values 'severity' 'error' 'warning' 'info' 'style'" \ + "(-V --version)[show version information]" \ + "(-W --wiki-link-count=)[set the number of wiki links to show]::number" \ + "(-x --external-sources)[allow running external sources]" \ +} + + + + + diff --git a/completions/_startosinstall b/completions/_startosinstall new file mode 100644 index 0000000..299ec8b --- /dev/null +++ b/completions/_startosinstall @@ -0,0 +1,30 @@ +#compdef startosinstall + +# + +_startosinstall() { + _arguments -S \ + "--usage[Displays all parameters available for the command.]" \ + "--agreetolicense[Agrees to the license agreement during deployment (Required for automated deployments).]" \ + "--rebootdelay[Delays reboot after preparation is complete, in seconds.]:seconds" \ + "--eraseinstall[Erases the existing APFS volume prior to installing macOS.]" \ + "--newvolumename[Renames the volume erased when used in conjunction with —eraseinstall.]:volume name" \ + "--converttoapfs[Coverts the existing filesystem to APFS. (Deprecated in macOS Mojave, however still exists in High Sierra).]" \ + "--nointeraction[Undocumented parameter that automates the deployment process without prompts.]" \ + "*::filename:_files" +} diff --git a/todo.md b/todo.md index 5f9f207..dd1c105 100644 --- a/todo.md +++ b/todo.md @@ -15,7 +15,6 @@ - [ ] productbuild - [ ] profiles - [ ] shellcheck -- [ ] startosinstall - [ ] sysadminctl - [ ] sysctl - [ ] tccutil @@ -32,6 +31,7 @@ - [x] plutil - [x] quickpkg - [x] see +- [x] startosinstall - [x] swift - [x] xed