feat: add installation script for automated setup and shell configura…#2
Merged
harkerhand merged 1 commit intomasterfrom Mar 13, 2026
Merged
feat: add installation script for automated setup and shell configura…#2harkerhand merged 1 commit intomasterfrom
harkerhand merged 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an automated installer to simplify installing the prebuilt jumping binary and guides users through setup via updated README documentation.
Changes:
- Added
install.shto download the latest release binary and optionally append shell init configuration. - Updated
README.mdandREADME_EN.mdto document one-click installation options and refreshed usage/controls text. - Adjusted English README structure and feature/installation sections.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
install.sh |
New Bash installer: OS detection, release download, install to system/user bin, and optional shell config append. |
README_EN.md |
Documents new installer flow and updates the English project/usage sections. |
README.md |
Documents new installer flow in Chinese and adds the hidden-files toggle control. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+235
to
+252
| echo "" | ||
| read -p "是否自动添加配置到 $CONFIG_FILE? [y/N]: " -n 1 -r | ||
| echo "" | ||
| if [[ $REPLY =~ ^[Yy]$ ]]; then | ||
| if [ -f "$CONFIG_FILE" ]; then | ||
| { | ||
| echo "" >> "$CONFIG_FILE" | ||
| } | ||
| echo "# JUMPING configuration" >> "$CONFIG_FILE" | ||
| jumping --init >> "$CONFIG_FILE" | ||
| log_success "配置已添加到 $CONFIG_FILE" | ||
| echo "" | ||
| echo "请重新启动终端或运行: source $CONFIG_FILE" | ||
| else | ||
| log_warn "配置文件 $CONFIG_FILE 不存在,创建新文件" | ||
| jumping --init > "$CONFIG_FILE" | ||
| log_success "配置文件已创建: $CONFIG_FILE" | ||
| fi |
| echo "" | ||
| echo "请重新启动终端或运行: source $CONFIG_FILE" | ||
| else | ||
| log_warn "配置文件 $CONFIG_FILE 不存在,创建新文件" |
| echo " jumping --init" | ||
| echo "" | ||
| echo "或者直接运行以下命令自动添加配置:" | ||
| echo " echo 'eval \"\$(jumping --init)\"' >> $CONFIG_FILE" |
| **For Fish:** | ||
|
|
||
| ```fish | ||
| jumping --init fish | source |
Comment on lines
+109
to
+113
| * **`j` / `k**` or **`↑` / `↓**`: Move up and down within the current directory. | ||
| * **`h` / `l**` or **`←` / `→**`: Traverse between parent and child directories. | ||
| * **`Enter`**: Confirm selection and jump to the directory. | ||
| * **`i`**: Toggle visibility of hidden files/folders. | ||
| * **`q` / `Esc**`: Quit the tool and stay in the current directory. |
Comment on lines
+35
to
40
| **方式二:直接运行(如果系统支持)** | ||
|
|
||
| ```bash | ||
| # Linux | ||
| wget https://github.com/harkerhand/jumping/releases/latest/download/jumping-linux | ||
| chmod +x jumping-linux | ||
| sudo mv jumping-linux /usr/local/bin/jumping | ||
|
|
||
| # macOS | ||
| wget https://github.com/harkerhand/jumping/releases/latest/download/jumping-macos | ||
| chmod +x jumping-macos | ||
| sudo mv jumping-macos /usr/local/bin/jumping | ||
| # 通过 curl 直接运行 | ||
| curl -sSL https://raw.githubusercontent.com/harkerhand/jumping/main/install.sh | bash | ||
| ``` |
|
|
||
| if ! case "$tool" in | ||
| curl) | ||
| curl -L -o "$output" "$url" |
| @@ -1,85 +1,113 @@ | |||
| ## [English](README_EN.md) | [中文](README.md) | |||
| ## [English](https://www.google.com/search?q=README_EN.md) | [中文](README.md) | |||
Comment on lines
+42
to
+45
| **Option 2: Direct Pipe (if supported)** | ||
|
|
||
| ```bash | ||
| # Run via curl |
Comment on lines
+226
to
+257
| # 运行 jumping --init 获取配置 | ||
| if command -v jumping &> /dev/null; then | ||
| echo "运行以下命令获取配置:" | ||
| echo " jumping --init" | ||
| echo "" | ||
| echo "或者直接运行以下命令自动添加配置:" | ||
| echo " echo 'eval \"\$(jumping --init)\"' >> $CONFIG_FILE" | ||
|
|
||
| # 询问是否自动添加配置 | ||
| echo "" | ||
| read -p "是否自动添加配置到 $CONFIG_FILE? [y/N]: " -n 1 -r | ||
| echo "" | ||
| if [[ $REPLY =~ ^[Yy]$ ]]; then | ||
| if [ -f "$CONFIG_FILE" ]; then | ||
| { | ||
| echo "" >> "$CONFIG_FILE" | ||
| } | ||
| echo "# JUMPING configuration" >> "$CONFIG_FILE" | ||
| jumping --init >> "$CONFIG_FILE" | ||
| log_success "配置已添加到 $CONFIG_FILE" | ||
| echo "" | ||
| echo "请重新启动终端或运行: source $CONFIG_FILE" | ||
| else | ||
| log_warn "配置文件 $CONFIG_FILE 不存在,创建新文件" | ||
| jumping --init > "$CONFIG_FILE" | ||
| log_success "配置文件已创建: $CONFIG_FILE" | ||
| fi | ||
| fi | ||
| else | ||
| log_error "jumping 命令未找到,请检查安装路径是否在 PATH 中" | ||
| echo "请手动将 $INSTALL_DIR 添加到 PATH 环境变量" | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…tion