Repository navigation
Shell Integration
Every crower command, a command of its own β in bash, zsh, fish, PowerShell and cmd.
crower init --apply # once; then open a new terminal
deploy # instead of: crower deploycrower init --apply detects your shell and writes the line for you. By hand:
| Shell | File | Line |
|---|---|---|
| bash | ~/.bashrc |
eval "$(crower init bash)" |
| zsh | ~/.zshrc |
eval "$(crower init zsh)" |
| fish | ~/.config/fish/config.fish |
crower init fish | source |
| PowerShell 7 | $PROFILE |
crower init powershell | Out-String | Invoke-Expression |
| cmd.exe | β | see cmd.exe below |
--apply writes a guarded form (command -v crower β¦ && eval β¦), so a shell
without crower installed still starts cleanly.
- β One alias per name and alias.
crower create greet "echo hi" -a higives yougreetandhi. Arguments pass through untouched βgreet -x 'two words'runscrower execute greet -- -x 'two words'. - π‘οΈ Never shadows. If the shell already knows the name β a program on
PATH, a builtin or keyword, your own alias or function β crower skips it. A command namedlsorgitstays reachable ascr ls. - π Stays in sync. The hook wraps
crowerandcr: aftercreate,update,delete,import,revert,restore,resetorsetup, the aliases are rebuilt in that shell β a new command works on the next line, a deleted one is gone. - β¨οΈ Completes.
cr <Tab>,crower execute <Tab>,update,deleteandexportoffer command names; zsh, fish and PowerShell show each one's description (or the line it runs). - πͺΆ Costs one process at shell start β a few milliseconds β and never checks for updates.
Names the hook can define: letters, digits, _ . + -, not starting with -.
crower and cr themselves are reserved.
cmd has no startup script, so the hook is a doskey macro file:
crower init cmd > "%USERPROFILE%\crower.doskey"
doskey /macrofile="%USERPROFILE%\crower.doskey"To load it in every cmd window, set the AutoRun value of
HKCU\Software\Microsoft\Command Processor to the doskey line. cmd does not
re-sync: run the first line again after adding commands.
type deploy # bash/zsh: "deploy is aliased to `command crower execute deploy --'"
crower init zsh | head # see exactly what the hook defines| Symptom | Cause |
|---|---|
deploy: command not found right after create in a script |
Aliases apply to lines read after they are defined; in an interactive shell the next prompt has it. |
echo y | crower delete x keeps the alias (bash) |
A function at the end of a pipe runs in a subshell; run it without the pipe. zsh is unaffected. |
| A command is not defined | Its name is already taken in the shell β type <name> shows by what. Use cr <name>. |
| zsh: no completion |
compinit must run before the hook line. |
init Β· import Β· β‘ Quick start Β· π Commands
Β© 2025 Felipe Inoue Β· crower is MIT licensed Β· third-party notices