Skip to content

Commit

Permalink
Complete simctl (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
odnoletkov authored Aug 1, 2022
1 parent 32a16dd commit a6e037f
Show file tree
Hide file tree
Showing 6 changed files with 1,520 additions and 20 deletions.
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Zsh completions for some of the Xcode command line tools. Currently:
- [`plutil`](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/plutil.1.html)
- [`xcode`-select](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html)
- [`xcodebuild`](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html)
- [`xcrun`](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcrun.1.html) See [shims](#shims) for more info
- [`xcrun`](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcrun.1.html)
- `strings`
- `swift-demangle`
- `swift`
Expand All @@ -25,17 +25,6 @@ brew install keith/formulae/zsh-xcode-completions
- pkgutil
- pmset

### Shims

Unfortunately, because of how `xcrun` happens to work, creating
completions that also handle the nested completions for programs run
through `xcrun` (such as `swift-demangle`) has proven to be difficult.
To get around this, I have created [shims](bin) for programs that could
use completions. I've also added a homebrew option (`--without-shims`)
if you would like to exclude these from being installed. One
disadvantage to this approach is you cannot pass arguments to the
`xcrun` command while calling a shim.

### Resources

<https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org>
3 changes: 0 additions & 3 deletions bin/swift-demangle

This file was deleted.

49 changes: 49 additions & 0 deletions specs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
all: simctl.txt

%.txt: FORCE
$(MAKE) "$(basename $@)" &>$@

FORCE:

simctl:
xcrun simctl || true
@for command in $$(xcrun simctl | grep '^\t' | awk '{print $$1}'); do \
echo; \
echo xcrun simctl help $$command; \
xcrun simctl help $$command; \
done
@# Undocumented/internal commands:
@echo
xcrun simctl help addphoto
@echo
xcrun simctl help addvideo
@echo
xcrun simctl help pbinfo
@echo
xcrun simctl help notify_post
@echo
xcrun simctl help notify_get_state
@echo
xcrun simctl help notify_set_state
@echo
xcrun simctl help register
@echo
xcrun simctl help unregister
@echo
xcrun simctl help keyboard
@echo
xcrun simctl help monitor
@echo
xcrun simctl help appinfo
@echo
xcrun simctl help listapps
@echo
xcrun simctl help bootstatus
@echo
xcrun simctl help darwinup
@echo
xcrun simctl help disk
@echo
xcrun simctl help runtime
@echo
xcrun simctl help reset
Loading

0 comments on commit a6e037f

Please sign in to comment.