Skip to content

Add fish shell support and new profile commands (rename/clone/exec/show/edit) - #11

Open
manawenuz wants to merge 1 commit into
quinnjr:mainfrom
manawenuz:feature/fish-support
Open

manawenuz wants to merge 1 commit into
quinnjr:mainfrom
manawenuz:feature/fish-support

Conversation

@manawenuz

Copy link
Copy Markdown

Summary

Adds fish shell support plus several new profile management commands. fish is not POSIX-compatible and cannot source claude-profile.sh, so this introduces claude-profile.fish — a native fish port with the same commands and the same on-disk profile layout, so profiles created from bash/zsh are visible in fish and vice versa.

What's included

  • claude-profile.fish — native fish implementation (functions, switch, string match), with fish complete registrations for subcommands and profile names.
  • New commands (in both the POSIX and fish implementations):
    • rename <old> <new> — rename a profile, following the default/active pointers
    • clone <src> <dst> — duplicate a profile, including its config dir
    • exec <name> [--] [args] — run claude with a profile for a single command, without switching the session
    • show [name] — print a profile's settings.json (default profile if omitted)
    • edit [name] — open settings.json in $VISUAL/$EDITOR
  • Completions — tab-completion of subcommands and profile names for bash, zsh, and fish.
  • install.sh — also installs claude-profile.fish and wires it into config.fish (skipped on Git Bash/MSYS2, which has no fish). The fish source line embeds the resolved absolute path because fish lacks POSIX ${VAR:-default} expansion.
  • README — documents the new commands, fish support, and manual fish install.

Notes / design

  • The POSIX claude-profile.sh changes are purely additive: the settings skeleton and editor-open logic were factored into _cp_write_skeleton / _cp_open_editor helpers (reused by create --init and the new edit), and the new subcommands were added ahead of the help case. No behavior change to existing commands.
  • exec deliberately bypasses the claude() wrapper via a one-shot env assignment so the session environment is untouched.
  • Windows (.ps1/.cmd) paths are unchanged.

Testing

  • claude-profile.fish exercised under fish: create/--init, list, default, use, which, show, clone, rename (incl. following the default pointer), name validation (bad/name, a..b rejected), and completions.
  • claude-profile.sh exercised under bash: clone, rename-follows-default, show error path, completions.
  • sh -n install.sh and fish --no-execute claude-profile.fish both pass.

🤖 Generated with Claude Code

fish is not POSIX-compatible and cannot source claude-profile.sh, so add
claude-profile.fish: a native fish port with the same commands and the
same on-disk profile layout, so profiles are shared across bash/zsh/fish.

Also extend both the POSIX and fish implementations with:
  - rename <old> <new>  (follows the default/active pointers)
  - clone <src> <dst>   (duplicates a profile's config dir)
  - exec <name> [--] [args]  (run claude with a profile once, no switch)
  - show [name]         (print a profile's settings.json)
  - edit [name]         (open settings.json in $VISUAL/$EDITOR)

Add tab-completion of subcommands and profile names for bash, zsh, and
fish, teach install.sh to install and wire up the fish file (skipped on
Git Bash/MSYS2, which has no fish), and document everything in the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@quinnjr

quinnjr commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Please rebase

This branch has not been deployed

No deployments
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