Skip to content

Commit

Permalink
[Update]优化 ow 的逻辑,优先打开 workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
bestswifter committed Jan 29, 2018
1 parent aa952c2 commit e89b627
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions doc/zsh.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ urldecode https%3A%2F%2Fbaidu.com

如果当期目录下存在 xcodeproj 文件或者 xcworkspace 文件,可以用 ow 命令快速打开,如果要打开的工程在别的目录,则使用 `ow path_to_project` 的命令打开

如果 wcworkspace 和 Xcodeproj 文件同时存在,优先打开前者。

### x 快速解压

使用命令 `x` 可以快速解压任何压缩文件
Expand Down
6 changes: 3 additions & 3 deletions zsh-config/platform.mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ function ow() {
if [[ -n "$@" ]]; then
(cd "$@" && ow)
else
if ls *.xcodeproj 2>&1 1>/dev/null; then
for i in *.xcodeproj;open "$i"
elif ls *.xcworkspace 2>&1 1>/dev/null; then
if ls *.xcworkspace 2>&1 1>/dev/null; then
for i in *.xcworkspace;open "$i"
elif ls *.xcodeproj 2>&1 1>/dev/null; then
for i in *.xcodeproj;open "$i"
else
echo "ERROR, xcode project not exists in '$(pwd)' !"
echo "Use this in xcode project directory or use 'ow <DIRECTORY>'"
Expand Down

0 comments on commit e89b627

Please sign in to comment.