Skip to content

[pull] master from wangdoc:master #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
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
27 changes: 13 additions & 14 deletions .github/workflows/wangdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@main
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: 'latest'
- name: Install dependencies
run: npm install
- name: Build pages
run: npm run build
- name: Deploy to website
uses: JamesIves/github-pages-deploy-action@3.7.1
uses: JamesIves/github-pages-deploy-action@v4
with:
GIT_CONFIG_NAME: wangdoc-bot
GIT_CONFIG_EMAIL: yifeng.ruan@gmail.com
REPOSITORY_NAME: wangdoc/website
ACCESS_TOKEN: ${{ secrets.WANGDOC_BOT_TOKEN }}
BASE_BRANCH: master
BRANCH: master # The branch the action should deploy to.
FOLDER: dist # The folder the action should deploy.
TARGET_FOLDER: dist/bash
CLEAN: true # Automatically remove deleted files from the deploy branch
COMMIT_MESSAGE: update from Bash tutorial
git-config-name: wangdoc-bot
git-config-email: yifeng.ruan@gmail.com
repository-name: wangdoc/website
token: ${{ secrets.WANGDOC_BOT_TOKEN }}
branch: master # The branch the action should deploy to.
folder: dist # The folder the action should deploy.
target-folder: dist/bash
clean: true # Automatically remove deleted files from the deploy branch
commit-message: update from Bash tutorial

3 changes: 1 addition & 2 deletions docs/condition.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ fi

以下表达式用来判断文件状态。

- `[ -a file ]`:如果 file 存在,则为`true`。
- `[ -b file ]`:如果 file 存在并且是一个块(设备)文件,则为`true`。
- `[ -c file ]`:如果 file 存在并且是一个字符(设备)文件,则为`true`。
- `[ -d file ]`:如果 file 存在并且是一个目录,则为`true`。
Expand Down Expand Up @@ -581,7 +580,7 @@ esac
- `[[:alpha:]])`:匹配单个字母。
- `???)`:匹配3个字符的单词。
- `*.txt)`:匹配`.txt`结尾。
- `*)`:匹配任意输入,通过作为`case`结构的最后一个模式。
- `*)`:匹配任意输入,通常作为`case`结构的最后一个模式。

```bash
#!/bin/bash
Expand Down
16 changes: 16 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ $ cat /etc/shells

Linux 允许每个用户使用不同的 Shell,用户的默认 Shell 一般都是 Bash,或者与 Bash 兼容。

使用`chsh`命令,可以改变系统的默认 Shell。举例来说,要将默认 Shell 从 Bash 改成 Fish,首先要找出 Fish 可执行文件的位置。

```bash
$ which fish
```

上面命令找出 Fish 可执行文件的位置,一般是`/usr/bin/fish`。

然后,使用`chsh`命令切换默认 Shell。

```bash
$ chsh -s /usr/bin/fish
```

上面命令会将当前的默认 Shell 改成 Fish。

## 命令行环境

### 终端模拟器
Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,10 @@
"bugs": {
"url": "https://github.com/wangdoc/bash-tutorial/issues"
},
"husky": {
"hooks": {
"pre-push": "npm update"
}
},
"homepage": "https://github.com/wangdoc/bash-tutorial#readme",
"dependencies": {
"gh-pages": "^5.0.0",
"husky": "^4.3.8",
"gh-pages": "6.x",
"loppo": "^0.6.25",
"loppo-theme-wangdoc": "^0.6.4"
"loppo-theme-wangdoc": "^0.7.1"
}
}