跳到主要内容
知仓学习社ZHICANG

shell-config

Shell configuration: Fish and Zsh setup, PATH, completions, plugins.

不碰外部(只输出文字)无严重或高危命中notque/vexjoy-agent

它会碰到什么

扫了多少11 个文本文件,89 KB
它会碰到什么不碰外部(只输出文字)
命中总数2 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Shell Configuration Skill

Unified skill for Fish and Zsh shell configuration. Detect the target shell first, then load the appropriate reference.

Reference Loading Table

| Shell | Signal | Load | Why |

|---|---|---|---|

| Fish | Any Fish context | fish-shell-config.md | Full Fish config patterns, syntax, file layout |

| Fish | Migrations from Bash | fish-bash-migration.md | Bash-to-Fish syntax translation |

| Fish | Variable scope, PATH, abbr, completions | fish-quick-reference.md | Variable scope guide, special variables, control flow |

| Fish | Error audit, broken config | fish-preferred-patterns.md | Failure modes with grep detection and error-fix mappings |

| Fish | Dev tool integration | fish-tool-integrations.md | Fish integration patterns for Go, Rust, Node, Python, Docker |

| Zsh | Any Zsh context | zsh-shell-config.md | Full Zsh config patterns, RC files, frameworks, hooks |

| Zsh | Migrations from Bash | zsh-bash-migration.md | Bash-to-Zsh syntax translation |

| Zsh | Variable scoping, expansion flags, special vars | zsh-quick-reference.md | Parameter expansion flags, special variables |

| Zsh | Error audit, slow startup, glob errors | zsh-preferred-patterns.md | Failure modes with grep detection and error-fix mappings |

| Zsh | Dev tool integration | zsh-tool-integrations.md | Zsh integration patterns for Go, Rust, Node, Python, Docker |

Instructions

Step 1: Detect Shell Type

Before loading references or writing code, determine the target shell:

  • Fish: $SHELL contains fish, target file has .fish extension, or target directory is ~/.config/fish/
  • Zsh: $SHELL contains zsh, target file is .zshrc/.zshenv/.zprofile, or has .zsh extension

If neither Fish nor Zsh, this skill does not apply.

Step 2: Load Shell-Specific Reference

Load the appropriate reference file from the table above based on the detected shell and the task signal. Start with the full config reference (fish-shell-config.md or zsh-shell-config.md), then load additional references as needed.

Step 3: Follow Shell-Specific Patterns

Each reference contains complete instructions for that shell. Follow them exactly — Fish and Zsh have incompatible syntax in many areas (variable assignment, PATH handling, conditionals, completions).

Key differences:

| Concept | Fish | Zsh |

|---------|------|-----|

| Variable assignment | set -gx VAR value | export VAR=value |

| PATH management | fish_add_path | typeset -U path; path=(...) |

| Completions | completions/ directory | compinit + fpath |

| Conditionals | test, not [[ ]] | [[ ]] preferred |

| Functions | function name ... end | function name { ... } |

| Interactive guard | status is-interactive | [[ -o interactive ]] |

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 419
本站分层T2
该仓技能数122
原文件路径skills/infrastructure/shell-config/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 122 个技能