diff --git a/.github/workflows/wangdoc.yml b/.github/workflows/wangdoc.yml index f0d006a..cdaefdf 100644 --- a/.github/workflows/wangdoc.yml +++ b/.github/workflows/wangdoc.yml @@ -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 diff --git a/docs/condition.md b/docs/condition.md index bec2c38..09ed6a5 100644 --- a/docs/condition.md +++ b/docs/condition.md @@ -156,7 +156,6 @@ fi 以下表达式用来判断文件状态。 -- `[ -a file ]`:如果 file 存在,则为`true`。 - `[ -b file ]`:如果 file 存在并且是一个块(设备)文件,则为`true`。 - `[ -c file ]`:如果 file 存在并且是一个字符(设备)文件,则为`true`。 - `[ -d file ]`:如果 file 存在并且是一个目录,则为`true`。 @@ -581,7 +580,7 @@ esac - `[[:alpha:]])`:匹配单个字母。 - `???)`:匹配3个字符的单词。 - `*.txt)`:匹配`.txt`结尾。 -- `*)`:匹配任意输入,通过作为`case`结构的最后一个模式。 +- `*)`:匹配任意输入,通常作为`case`结构的最后一个模式。 ```bash #!/bin/bash diff --git a/docs/grammar.md b/docs/grammar.md index a7a1dfe..c7a2f08 100644 --- a/docs/grammar.md +++ b/docs/grammar.md @@ -89,7 +89,7 @@ $ ls -l 上面这个命令中,`ls`是命令,`-l`是参数。 -有些参数是命令的配置项,这些配置项一般都以一个连词线开头,比如上面的`-l`。同一个配置项往往有长和短两种形式,比如`-l`是短形式,`--list`是长形式,它们的作用完全相同。短形式便于手动输入,长形式一般用在脚本之中,可读性更好,利于解释自身的含义。 +有些参数是命令的配置项,这些配置项一般都以一个连词线开头,比如上面的`-l`。同一个配置项往往有长和短两种形式,比如`-r`是短形式,`--reverse`是长形式,它们的作用完全相同。短形式便于手动输入,长形式一般用在脚本之中,可读性更好,利于解释自身的含义。 ```bash # 短形式 diff --git a/docs/intro.md b/docs/intro.md index ffcc52c..90ed9c8 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -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。 + ## 命令行环境 ### 终端模拟器 diff --git a/package.json b/package.json index ef688d0..9be0d29 100644 --- a/package.json +++ b/package.json @@ -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" } }