Skip to content

feat: add installation script for automated setup and shell configura…#2

Merged
harkerhand merged 1 commit intomasterfrom
feat/install
Mar 13, 2026
Merged

feat: add installation script for automated setup and shell configura…#2
harkerhand merged 1 commit intomasterfrom
feat/install

Conversation

@harkerhand
Copy link
Copy Markdown
Owner

…tion

Copilot AI review requested due to automatic review settings March 13, 2026 08:52
@harkerhand harkerhand merged commit 0f6c155 into master Mar 13, 2026
6 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh to download the latest release binary and optionally append shell init configuration.
  • Updated README.md and README_EN.md to 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants