Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@

.DS_Store
.vscode
.gitignore
6 changes: 4 additions & 2 deletions completions/_PlistBuddy
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#compdef PlistBuddy

_PlistBuddy() {

local commands="'Help' 'Clear' 'Print' 'Set' 'Add' 'Copy' 'Delete' 'Merge' 'Save'"
_arguments \
"-c[\"<command>\" execute command, otherwise run in interactive mode]" \
"-c[\"<command>\" 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"
}
}
23 changes: 23 additions & 0 deletions completions/_bbdiff
Original file line number Diff line number Diff line change
@@ -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"
}
23 changes: 23 additions & 0 deletions completions/_bbfind
Original file line number Diff line number Diff line change
@@ -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]

}
9 changes: 9 additions & 0 deletions completions/_bbresults
Original file line number Diff line number Diff line change
@@ -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]" \"
}

11 changes: 11 additions & 0 deletions completions/_dsenableroot
Original file line number Diff line number Diff line change
@@ -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]" \
}
25 changes: 25 additions & 0 deletions completions/_quickpkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#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]: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]" \
"(--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]" \
"(-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"
}
30 changes: 30 additions & 0 deletions completions/_shellcheck
Original file line number Diff line number Diff line change
@@ -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]" \
}





30 changes: 30 additions & 0 deletions completions/_startosinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#compdef startosinstall

# <!-- startosinstall command & syntax
# Command: startosinstall

# Requires root access: Yes

# Parameters:

# - -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.
# - -eraseinstall: Erases the existing APFS volume prior to installing macOS.
# - -newvolumename: Renames the volume erased when used in conjunction with —eraseinstall.
# - -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.
# -
# https://www.techrepublic.com/article/pro-tip-performing-a-clean-install-or-upgrade-of-macos-mojave-via-terminal/ -->

_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"
}
61 changes: 31 additions & 30 deletions todo.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
- [x] desktoppr
- [ ] xattr

- [ ] app-sso
- [ ] autopkg
- [ ] createinstallmedia
- [ ] diskutil
- [ ] diskutil
- [ ] dscl
- [ ] dseditgroup
- [ ] dsenableroot
- [ ] launchctl
- [x] jamf
- [ ] dsimport
- [ ] fdesetup
- [ ] ioreg
- [ ] log
- [ ] pkgbuild
- [ ] productbuild
- [x] swift
- [x] xed
- [ ] xcodebuild
- [ ] xcrun (started)
- [x] bbedit
- [ ] bbdiff
- [ ] bbresults
- [ ] bbfind
- [ ] profiles
- [ ] shellcheck
- [ ] dsenableroot
- [ ] 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
- [ ] tmutil
- [ ] quickpkg
- [ ] diskutil
- [ ] fdesetup
- [x] jamf
- [x] plutil
- [x] quickpkg
- [x] see
- [ ] app-sso

- [x] startosinstall
- [x] swift
- [x] xed

*available at https://github.com/nilsonholger/osx-zsh-completions*

- launchctl
- systemsetup
- tmutil
- xattr

*zsh 5.3 (High Sierra/Mojave)*

Expand Down