-
Notifications
You must be signed in to change notification settings - Fork 284
Bugfix/issue #122 fish shell support #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
stephenfeather
wants to merge
6
commits into
parcadei:main
Choose a base branch
from
stephenfeather:bugfix/issue-122-fish-shell-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f08eb5d
Add YAML frontmatter metadata to skill docs
stephenfeather 2d8a55f
Add YAML frontmatter metadata to skill docs
stephenfeather d315755
Merge origin/main
stephenfeather 9b429c2
Merge origin/main
stephenfeather 0a56bf4
Merge branch 'main' of github.com:stephenfeather/Continuous-Claude-v3
stephenfeather b155caf
feat: add fish shell support and environment verification to setup wi…
stephenfeather File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| --- | ||
| name: commit | ||
| description: Create git commits with user approval and no Claude attribution | ||
| --- | ||
|
|
||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| --- | ||
| name: create-handoff | ||
| description: Create handoff document for transferring work to another session | ||
| --- | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| --- | ||
| name: debug | ||
| description: Debug issues by investigating logs, database state, and git history | ||
| --- | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| --- | ||
| name: describe-pr | ||
| description: Generate comprehensive PR descriptions following repository templates | ||
| --- | ||
|
|
||
|
|
||
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| --- | ||
| name: tldr-stats | ||
| description: Show full session token usage, costs, TLDR savings, and hook activity | ||
| --- | ||
|
|
||
|
|
||
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
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
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
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -506,6 +506,25 @@ def generate_env_file(config: dict[str, Any], env_path: Path) -> None: | |||||
| env_path.write_text("\n".join(lines)) | ||||||
|
|
||||||
|
|
||||||
| def get_shell_config() -> tuple[Path | None, str]: | ||||||
| """Get the shell config path and type based on current SHELL. | ||||||
|
|
||||||
| Returns: | ||||||
| tuple: (config_path, shell_type) | ||||||
| """ | ||||||
| shell = os.environ.get("SHELL", "").lower() | ||||||
|
|
||||||
| if "zsh" in shell: | ||||||
| return Path.home() / ".zshrc", "zsh" | ||||||
| if "fish" in shell: | ||||||
| # Standard location for fish config | ||||||
| return Path.home() / ".config" / "fish" / "config.fish", "fish" | ||||||
| if "bash" in shell: | ||||||
| return Path.home() / ".bashrc", "bash" | ||||||
|
|
||||||
| return None, "unknown" | ||||||
|
|
||||||
|
|
||||||
| async def run_setup_wizard() -> None: | ||||||
| """Run the interactive setup wizard. | ||||||
|
|
||||||
|
|
@@ -838,17 +857,16 @@ async def run_setup_wizard() -> None: | |||||
|
|
||||||
| # Set CLAUDE_OPC_DIR environment variable for skills to find scripts | ||||||
| console.print(" Setting CLAUDE_OPC_DIR environment variable...") | ||||||
| shell_config = None | ||||||
| shell = os.environ.get("SHELL", "") | ||||||
| if "zsh" in shell: | ||||||
| shell_config = Path.home() / ".zshrc" | ||||||
| elif "bash" in shell: | ||||||
| shell_config = Path.home() / ".bashrc" | ||||||
| shell_config, shell_type = get_shell_config() | ||||||
|
|
||||||
| opc_dir = _project_root # Use script location, not cwd (robust if invoked from elsewhere) | ||||||
| if shell_config and shell_config.exists(): | ||||||
| content = shell_config.read_text() | ||||||
| export_line = f'export CLAUDE_OPC_DIR="{opc_dir}"' | ||||||
| if shell_type == "fish": | ||||||
| export_line = f'set -gx CLAUDE_OPC_DIR "{opc_dir}"' | ||||||
| else: | ||||||
| export_line = f'export CLAUDE_OPC_DIR="{opc_dir}"' | ||||||
|
|
||||||
| if "CLAUDE_OPC_DIR" not in content: | ||||||
| with open(shell_config, "a") as f: | ||||||
| f.write(f"\n# Continuous-Claude OPC directory (for skills to find scripts)\n{export_line}\n") | ||||||
|
|
@@ -1199,18 +1217,15 @@ async def run_setup_wizard() -> None: | |||||
|
|
||||||
| # Set LOOGLE_HOME environment variable | ||||||
| console.print(" Setting LOOGLE_HOME environment variable...") | ||||||
| shell_config = None | ||||||
| shell = os.environ.get("SHELL", "") | ||||||
| if "zsh" in shell: | ||||||
| shell_config = Path.home() / ".zshrc" | ||||||
| elif "bash" in shell: | ||||||
| shell_config = Path.home() / ".bashrc" | ||||||
| elif sys.platform == "win32": | ||||||
| shell_config = None # Windows uses different mechanism | ||||||
| shell_config, shell_type = get_shell_config() | ||||||
|
|
||||||
| if shell_config and shell_config.exists(): | ||||||
| content = shell_config.read_text() | ||||||
| export_line = f'export LOOGLE_HOME="{loogle_home}"' | ||||||
| if shell_type == "fish": | ||||||
| export_line = f'set -gx LOOGLE_HOME "{loogle_home}"' | ||||||
| else: | ||||||
| export_line = f'export LOOGLE_HOME="{loogle_home}"' | ||||||
|
|
||||||
| if "LOOGLE_HOME" not in content: | ||||||
| with open(shell_config, "a") as f: | ||||||
| f.write(f"\n# Loogle (Lean 4 type search)\n{export_line}\n") | ||||||
|
|
@@ -1252,6 +1267,21 @@ async def run_setup_wizard() -> None: | |||||
| console.print(" Skipped Loogle installation") | ||||||
| console.print(" [dim]Install later by re-running the wizard[/dim]") | ||||||
|
|
||||||
| # Verification step | ||||||
| opc_dir_env = os.environ.get("CLAUDE_OPC_DIR") | ||||||
| if not opc_dir_env: | ||||||
| console.print("\n[yellow]WARNING: CLAUDE_OPC_DIR is not set in your current shell session.[/yellow]") | ||||||
| console.print("Core features like memory and learnings may not function correctly until set.") | ||||||
| console.print("\nTo fix this:") | ||||||
|
|
||||||
| shell_config, _ = get_shell_config() | ||||||
| if shell_config: | ||||||
| console.print(f" 1. Run: [bold]source {shell_config}[/bold]") | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: opc/scripts/setup/wizard.py
Line: 1279:1279
Comment:
`source` doesn't work with fish shell. For fish, the instruction should be different (fish uses just the path without `source`, or can use `.` for POSIX scripts).
```suggestion
console.print(f" 1. Restart your terminal or reload config")
```
How can I resolve this? If you propose a fix, please make it concise. |
||||||
| else: | ||||||
| console.print(" 1. Restart your terminal session") | ||||||
|
|
||||||
| console.print(" 2. Then start Claude Code") | ||||||
|
|
||||||
| # Done! | ||||||
| console.print("\n" + "=" * 60) | ||||||
| console.print("[bold green]Setup complete![/bold green]") | ||||||
|
|
||||||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fish config directory
~/.config/fish/may not exist. Should create it before attempting to write toconfig.fish, otherwise the write operation will fail.Add before line 863 and 1222:
Prompt To Fix With AI