Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
Signed-off-by: leleliu008 <[email protected]>
  • Loading branch information
leleliu008 committed Dec 12, 2023
1 parent 1f365d6 commit 09fff62
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 30 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ all relevant directories and files are located under `~/.xcpkg` directory.
```bash
xcpkg list curl
xcpkg list iPhoneOS-12.0-arm64/curl -L 3
xcpkg list iPhoneOS-12.0-arm64/curl
```
- **list installed files of the given installed package in a tree-like format**
Expand Down Expand Up @@ -418,7 +418,7 @@ all relevant directories and files are located under `~/.xcpkg` directory.

- **XCPKG_DEFAULT_TARGET**

some commands need `<PACKAGE-SPEC>` to be specified. `<PACKAGE-SPEC>` has the form `<TARGET>/<PACKAGE-NAME>`. To simplify the usage, `xcpkg` allows omitting `<TARGET>/`. If `<TARGET>/` is omitted, this environment variable will be used, if this environment variable is not set, then will retrive your current running system's information.
some commands need `<PACKAGE-SPEC>` to be specified. `<PACKAGE-SPEC>` has the form `<TARGET>/<PACKAGE-NAME>`. To simplify the usage, `xcpkg` allows omitting `<TARGET>/`. If `<TARGET>/` is omitted, this environment variable will be used, if this environment variable is not set, then will retrive your current running os's information.
`<TARGET>` has the form `<TARGET-PLATFORM-NAME>-<TARGET-PLATFORM-VERSION>-<TARGET-PLATFORM-ARCH>`
Expand Down Expand Up @@ -513,16 +513,18 @@ a uppm formula's file content only has one level mapping and shall has following
|-|-|
|`TIMESTAMP_UNIX`|the unix timestamp of this action.|
|||
|`NATIVE_OS_KIND`|current running machine os kind.|
|`NATIVE_OS_TYPE`|current running machine os type.|
|`NATIVE_OS_NAME`|current running machine os name.|
|`NATIVE_OS_VERS`|current running machine os version.|
|`NATIVE_OS_ARCH`|current running machine os arch.|
|`NATIVE_OS_NCPU`|current running machine os's cpu core count.|
|`NATIVE_OS_KIND`|current running os kind. value shall be `darwin`|
|`NATIVE_OS_TYPE`|current running os type. value shall be `macos`|
|`NATIVE_OS_NAME`|current running os name. value shall be `MacOSX`|
|`NATIVE_OS_VERS`|current running os version.|
|`NATIVE_OS_ARCH`|current running os arch. value might be any one of `x86_64`, `arm64`, etc|
|`NATIVE_OS_NCPU`|current running os's cpu core count.|
|`NATIVE_OS_EUID`|current running os's effective user ID.|
|`NATIVE_OS_EGID`|current running os's effective group ID.|
|||
|`TARGET_PLATFORM_NAME`|target platform name that is built for.|
|`TARGET_PLATFORM_NAME`|target platform name that is built for. value shall be any one of `AppleTVOS` `AppleTVSimulator` `DriverKit` `MacOSX` `WatchOS` `WatchSimulator` `iPhoneOS` `iPhoneSimulator`|
|`TARGET_PLATFORM_VERS`|target platform version that is built with.|
|`TARGET_PLATFORM_ARCH`|target platform arch that is built for.|
|`TARGET_PLATFORM_ARCH`|target platform arch that is built for. value might be any one of `x86_64`, `arm64`, etc|
|||
|`CROSS_COMPILING`|value shall be 0 or 1. indicates whether is cross-compiling.|
|||
Expand Down
12 changes: 8 additions & 4 deletions xcpkg
Original file line number Diff line number Diff line change
Expand Up @@ -7571,12 +7571,16 @@ ${COLOR_GREEN}xcpkg search <REGULAR-EXPRESSION-PATTERN>${COLOR_OFF}
search all available packages whose name matches the given regular expression pattern.


${COLOR_GREEN}xcpkg info <PACKAGE-NAME> [--json] [--yaml] [<KEY>]${COLOR_OFF}
show information of the given package.

${COLOR_GREEN}xcpkg info @all [--json] [--yaml] [--shell]${COLOR_OFF}
${COLOR_GREEN}xcpkg info @all [--json | --yaml | --shell]${COLOR_OFF}
show information of all the available packages.

${COLOR_GREEN}xcpkg info <PACKAGE-NAME> [--json | --yaml | <KEY>]${COLOR_OFF}
show information of the given available package.

${COLOR_GREEN}xcpkg info <PACKAGE-SPEC> [--json | --yaml | <KEY>]${COLOR_OFF}
show information of the given installed package.


${COLOR_GREEN}xcpkg depends <PACKAGE-NAME> [-t <dot|box|svg|png>] [-o <OUTPUT-PATH>]${COLOR_OFF}
show the packages that are depended by the given package.

Expand Down
27 changes: 11 additions & 16 deletions xcpkg-zsh-completion
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@ _xcpkg_actions=(
'--help:show help of this command.'
'-V:show version of this command.'
'--version:show version of this command.'
'search:search packages can be installed.'
'gen-url-transform-sample:generate url-transform sample.'
'setup:install essential tools.'
'env:show system and current actived xcode information.'
'sysinfo:show your system information.'
'xcinfo:show your current actived xcode information.'
'integrate:integrate zsh completions.'
'cleanup:delete the unused cached files.'
'ls-available:list the available packages.'
'ls-installed:list the installed packages.'
'ls-outdated:list the installed packages which can be upgraded.'
'is-available:is the given package available.'
'is-installed:is the given package installed.'
'is-outdated:is the given package outdated.'
'info:show infomation of the given package or all available packages.'
'formula-edit:edit the formula of the given package.'
'formula-repo-init:create a new empty formula repository.'
'formula-repo-add:create a new empty formula repository then sync with server.'
'formula-repo-del:delete the given formula repository from your local cache.'
'formula-repo-sync:sync the given formula repository.'
'formula-repo-conf:change the config of the given formula repository.'
'formula-repo-info:show infomation of the given formula repository.'
'formula-repo-list:list all available formula repositories.'
'search:search packages can be installed.'
'info:show infomation of the given package or all available packages.'
'depends:show depends of the given package.'
'fetch:download formula resources of the given package to the cache.'
'install:install packages.'
'reinstall:reinstall packages.'
'uninstall:uninstall packages.'
'cleanup:delete the unused cached files.'
'update:update the formula repository.'
'upgrade:upgrade the outdated packages.'
'upgrade-self:upgrade this software.'
'fetch:download formula resources of the given package to the cache.'
'integrate:integrate zsh completions.'
'sysinfo:show your system information.'
'xcinfo:show your current actived xcode information.'
'env:show system and current actived xcode information.'
'depends:show depends of the given package.'
'list:list installed files of the given installed package.'
'tree:list installed files of the given installed package in a tree-like format.'
'logs:show logs of the given installed package.'
'pack:pack all the installed files of the given installed package to a single archive file.'
'gen-url-transform-sample:generate url-transform sample.'
)

function _xcpkg_available_packages() {
Expand Down Expand Up @@ -78,11 +78,6 @@ function _xcpkg() {
':platform:($(xcpkg ls-target-platform-names))' \
':bit:(64bit 32bit all)'
;;
formula-edit)
_arguments \
'1:package-name:_xcpkg_available_packages' \
'--editor=-[specify editor]'
;;
formula-repo-add)
_arguments \
'1:formula-repo-name:(name)' \
Expand Down

0 comments on commit 09fff62

Please sign in to comment.