Skip to content

feat: Add Linux support to terminal setup scripts#1

Open
dmythro wants to merge 2 commits into
mainfrom
linux-apt
Open

feat: Add Linux support to terminal setup scripts#1
dmythro wants to merge 2 commits into
mainfrom
linux-apt

Conversation

@dmythro

@dmythro dmythro commented Feb 18, 2026

Copy link
Copy Markdown
Owner
  • Updated README.md to reflect Linux compatibility and installation instructions.
  • Modified setup-terminal.sh to detect OS and install packages using apt for Linux.
  • Enhanced reset-terminal.sh to support package uninstallation on Linux.
  • Introduced a new TODO-Linux.md file outlining the plan for Linux support.
  • Adjusted clipboard handling in tmux configuration for cross-platform compatibility.
  • Made .zshrc configuration cross-platform by checking paths at runtime.
  • Updated font installation instructions for Linux users.
  • Ensured that macOS-specific features are conditionally executed.

- Updated README.md to reflect Linux compatibility and installation instructions.
- Modified setup-terminal.sh to detect OS and install packages using apt for Linux.
- Enhanced reset-terminal.sh to support package uninstallation on Linux.
- Introduced a new TODO-Linux.md file outlining the plan for Linux support.
- Adjusted clipboard handling in tmux configuration for cross-platform compatibility.
- Made .zshrc configuration cross-platform by checking paths at runtime.
- Updated font installation instructions for Linux users.
- Ensured that macOS-specific features are conditionally executed.
Copilot AI review requested due to automatic review settings February 18, 2026 21:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds Ubuntu/Debian (apt-based) Linux support to the terminal setup/reset scripts while keeping macOS behavior intact, and updates docs to reflect cross-platform usage.

Changes:

  • Add OS detection + Linux package installation paths (apt, curl installers, git clone) to setup-terminal.sh.
  • Extend reset-terminal.sh to optionally uninstall Linux-installed components and conditionally skip macOS-only steps.
  • Update documentation (README.md, AGENTS.md) and add a Linux-support plan (TODO-Linux.md).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
setup-terminal.sh Detect OS and install core/dev tooling via brew (macOS) or apt/curl/git (Linux); update tmux/zsh config for cross-platform clipboard and plugin paths.
reset-terminal.sh Add OS detection; conditionally reset macOS Terminal profile; add Linux uninstall flow for apt + cloned assets.
README.md Update messaging/instructions and font guidance to include Linux (apt + manual font install notes).
AGENTS.md Document cross-platform script structure (OS detection, sed_inplace, placeholders, Linux install/uninstall behavior).
TODO-Linux.md Add an implementation plan and validation checklist for Linux support.
Comments suppressed due to low confidence (1)

setup-terminal.sh:299

  • On Ubuntu/Debian the package fd-find installs the fdfind binary (not fd). Since FZF_ALT_C_COMMAND is set before the later alias fd='fdfind', this condition won’t be true and fzf won’t use fd for directory search. Update the logic to also detect fdfind (or define the alias earlier) so Linux gets the intended fast path.
# Use ripgrep/fd with fzf if available
command -v rg &>/dev/null && export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git"'
command -v fd &>/dev/null && export FZF_ALT_C_COMMAND='fd --type d --hidden --exclude .git'


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread setup-terminal.sh
sudo apt update
sudo apt install -y zsh fzf zsh-autosuggestions zsh-syntax-highlighting xclip
# zsh-completions: not in apt, clone from GitHub
if [[ ! -d "$HOME/.zsh/zsh-completions" ]]; then

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

On Linux, this clones into /.zsh/zsh-completions but the parent directory (/.zsh) may not exist on a fresh machine, causing git clone to fail with “No such file or directory”. Create the parent directory first (e.g., mkdir -p "$HOME/.zsh") before cloning.

Suggested change
if [[ ! -d "$HOME/.zsh/zsh-completions" ]]; then
if [[ ! -d "$HOME/.zsh/zsh-completions" ]]; then
mkdir -p "$HOME/.zsh"

Copilot uses AI. Check for mistakes.
Comment thread setup-terminal.sh
Comment on lines +44 to +49
sudo apt update
sudo apt install -y zsh fzf zsh-autosuggestions zsh-syntax-highlighting xclip
# zsh-completions: not in apt, clone from GitHub
if [[ ! -d "$HOME/.zsh/zsh-completions" ]]; then
git clone --depth 1 https://github.com/zsh-users/zsh-completions ~/.zsh/zsh-completions
fi

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

This section runs git clone on Linux without ensuring git is installed. On minimal Ubuntu/Debian installs, git may be missing, which will abort the script under set -e. Consider adding git to the apt install list (or installing it only when needed) before cloning zsh-completions.

Copilot uses AI. Check for mistakes.
Comment thread reset-terminal.sh
if [[ ${#INSTALLED_APT[@]} -gt 0 ]]; then
echo " Removing apt packages: ${INSTALLED_APT[*]}"
sudo apt remove -y "${INSTALLED_APT[@]}" 2>/dev/null || true
fi

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

The Linux setup adds the GitHub CLI apt repository and keyring, but the reset script’s Linux uninstall path doesn’t remove those system-level files. To fully undo setup, also delete /etc/apt/sources.list.d/github-cli.list and /etc/apt/keyrings/githubcli-archive-keyring.gpg (and run apt update) when uninstalling.

Suggested change
fi
fi
# Remove GitHub CLI apt repository and keyring added by setup-terminal.sh
GH_CLI_LIST="/etc/apt/sources.list.d/github-cli.list"
GH_CLI_KEYRING="/etc/apt/keyrings/githubcli-archive-keyring.gpg"
GH_CLI_CHANGED=false
if [[ -f "$GH_CLI_LIST" ]]; then
echo " Removing GitHub CLI apt source list ($GH_CLI_LIST)..."
sudo rm -f "$GH_CLI_LIST" 2>/dev/null || true
GH_CLI_CHANGED=true
fi
if [[ -f "$GH_CLI_KEYRING" ]]; then
echo " Removing GitHub CLI apt keyring ($GH_CLI_KEYRING)..."
sudo rm -f "$GH_CLI_KEYRING" 2>/dev/null || true
GH_CLI_CHANGED=true
fi
if [[ "$GH_CLI_CHANGED" == true ]]; then
echo " Updating apt package index after removing GitHub CLI repository..."
sudo apt update 2>/dev/null || true
fi

Copilot uses AI. Check for mistakes.
Resolve README.md conflict: keep simplified tmux section from main
(keybindings moved to Keyboard Shortcuts section) with linux-apt's
"system clipboard" wording for cross-platform consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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