Conversation
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>
Owner
|
Please rebase |
This branch has not been deployed
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.
Summary
Adds fish shell support plus several new profile management commands. fish is not POSIX-compatible and cannot source
claude-profile.sh, so this introducesclaude-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 fishcompleteregistrations for subcommands and profile names.rename <old> <new>— rename a profile, following the default/active pointersclone <src> <dst>— duplicate a profile, including its config direxec <name> [--] [args]— runclaudewith a profile for a single command, without switching the sessionshow [name]— print a profile'ssettings.json(default profile if omitted)edit [name]— opensettings.jsonin$VISUAL/$EDITORinstall.sh— also installsclaude-profile.fishand wires it intoconfig.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.Notes / design
claude-profile.shchanges are purely additive: the settings skeleton and editor-open logic were factored into_cp_write_skeleton/_cp_open_editorhelpers (reused bycreate --initand the newedit), and the new subcommands were added ahead of thehelpcase. No behavior change to existing commands.execdeliberately bypasses theclaude()wrapper via a one-shot env assignment so the session environment is untouched..ps1/.cmd) paths are unchanged.Testing
claude-profile.fishexercised under fish: create/--init, list, default, use, which, show, clone, rename (incl. following the default pointer), name validation (bad/name,a..brejected), and completions.claude-profile.shexercised under bash: clone, rename-follows-default, show error path, completions.sh -n install.shandfish --no-execute claude-profile.fishboth pass.🤖 Generated with Claude Code