Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Removed duplication, resolved conflicts, and improved organization across Fish config files.

Changes

Duplication removed:

  • brmig abbreviation appeared twice → renamed second to brmis ('brew missing')
  • PATH additions for lmstudio, windsurf, opencode scattered across config.fish and interactive.fish → consolidated in final.fish
  • kiro shell integration duplicated → single instance in final.fish

Conflicts resolved:

  • cc abbreviation (claude) conflicted with cc function (clear screen) → renamed abbreviation to cl

Dead code removed:

  • Commented-out env vars: AQUA_GLOBAL_CONFIG, PYTHON_BUILD_FREE_THREADING, RUSTC_WRAPPER
  • Redundant GITHUB_TOKEN shell wrapping (conflicts with existing github-auth function)

Net result: -22 lines across 5 files

Original prompt

Clean up my Fish configuration


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@trunk-io
Copy link

trunk-io bot commented Jan 22, 2026

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

Co-authored-by: daveio <66192+daveio@users.noreply.github.com>
Copilot AI changed the title [WIP] Clean up Fish configuration for better readability Clean up Fish shell configuration Jan 22, 2026
Copilot AI requested a review from daveio January 22, 2026 13:29
@claude
Copy link

claude bot commented Jan 22, 2026

Code Review: Clean up Fish shell configuration

This PR improves organization and removes duplication in the Fish configuration. Overall, it's a solid cleanup.

✅ What's Good

  1. Duplicate abbreviation fix: Renaming the second brmig to brmis for brew missing is correct and necessary.

  2. PATH consolidation: Moving scattered PATH additions (lmstudio, windsurf, opencode) to final.fish improves maintainability. Using $HOME instead of hardcoded /Users/dave makes the configuration more portable.

  3. Dead code removal: Removing commented-out environment variables (AQUA_GLOBAL_CONFIG, PYTHON_BUILD_FREE_THREADING, RUSTC_WRAPPER) keeps the config clean.

  4. Kiro integration deduplication: Having a single instance of the kiro shell integration is cleaner.

⚠️ Concerns

  1. Abbreviation rename cccl may cause friction

    • The cc abbreviation for claude conflicted with the cc function (clear screen + run command).
    • However, cl is less intuitive for claude. Consider alternatives:
      • cla for claude
      • ccode for claude code
      • Or rename the function instead (e.g., clr for clear)
    • The function cc in funcs.fish:387 could be renamed since it's essentially clear && $argv, which is less frequently typed directly.
  2. GITHUB_TOKEN removal may have side effects

    • The removed line was: set -gx GITHUB_TOKEN ($HOME/.local/share/mise/shims/gh auth token)
    • This eagerly set GITHUB_TOKEN at shell startup, while the github-auth function (funcs.fish:78) requires explicit invocation.
    • Some tools may expect GITHUB_TOKEN to be set automatically. The up abbreviation (abbrs.fish:211) calls github-auth, but other workflows might break.
    • Consider if you need GITHUB_TOKEN set on startup or only on-demand.
  3. final.fish now runs for both interactive and non-interactive shells

    • The PATH additions in final.fish will now run for all shell types (including script execution).
    • This is likely fine since PATH modifications are usually needed everywhere, but it's worth noting.

💡 Suggestions

  1. Add guard for kiro integration: The kiro line could fail silently if kiro isn't installed:

    command -q kiro && string match -q "$TERM_PROGRAM" "kiro" && . (kiro --locate-shell-integration-path fish)
  2. Consider using fish_add_path --path option: For paths that might not exist on all machines, consider checking existence first or using appropriate flags.

Summary

The changes are improvements overall. The main decision points are:

  • Is cl acceptable for claude, or should the cc function be renamed instead?
  • Should GITHUB_TOKEN be set eagerly at startup (restore the line) or on-demand only (current behavior)?

Once those are confirmed as intentional, this PR is ready to merge.

@daveio daveio marked this pull request as ready for review January 22, 2026 15:02
Copilot AI review requested due to automatic review settings January 22, 2026 15:02
Copy link

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

This PR cleans up Fish shell configuration files by eliminating duplications, resolving conflicts, and improving code organization. The cleanup removes 22 lines of redundant or problematic code while consolidating scattered configurations into a more maintainable structure.

Changes:

  • Resolved duplicate abbreviations (brmig/brmis) and conflicting names (cc function vs abbreviation)
  • Consolidated scattered PATH additions (lmstudio, windsurf, opencode) and kiro shell integration into final.fish
  • Removed dead code including commented-out environment variables and redundant GITHUB_TOKEN configuration

Reviewed changes

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

Show a summary per file
File Description
vars.fish Removed commented-out environment variables and redundant GITHUB_TOKEN shell wrapping that conflicts with existing github-auth function
interactive.fish Removed PATH additions and kiro integration that were moved to final.fish for better organization
final.fish Consolidated PATH additions using fish_add_path (best practice) and kiro shell integration, improving upon hardcoded paths with $HOME variable
config.fish Removed duplicate PATH additions and kiro integration now properly placed in final.fish
abbrs.fish Renamed duplicate brmig to brmis for 'brew missing' and changed cc to cl to avoid conflict with existing cc function

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

@daveio daveio merged commit 6680695 into main Jan 22, 2026
18 checks passed
@daveio daveio deleted the copilot/clean-up-fish-configuration branch January 22, 2026 15:08
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