First steps
This walks you from a freshly installed brush to one that’s highlighting your input and has a startup file of its own.
-
Start
brushfrom your current shell.brushIf you were using Bash, you should land at a prompt that looks like the one you already had. That’s deliberate: started this way, brush is a non-login shell (see which files are read) and reads
~/.bashrc, then~/.brushrc, which you’ll create in a moment. So your aliases, functions, exports andPS1all come with you. -
Try a few things. Ordinary Bash works as-is:
echo "Hello from brush!"ls -la | grep '\.conf'for i in 1 2 3; do echo "$i"; doneHistory suggestions are enabled from the start: start retyping one of the commands above and the rest of it appears in dim text ahead of the cursor. Press the right arrow to accept it. By default brush keeps its history in
~/.brush_history, so suggestions start from the commands you run in brush. -
Turn on syntax highlighting. It’s off by default. To try it for one session, type
exitand runbrush --enable-highlighting. To keep it, create~/.config/brush/config.toml(on Windows,%APPDATA%\brush\config.toml):~/.config/brush/config.toml [ui]syntax-highlighting = trueThen type
exitto get back to your previous shell, and startbrushagain. Now your input is colorized as you type, and a command that can’t be found turns red once you’ve typed a space after it. -
Give brush its own prompt.
~/.brushrcis read only by brush, after~/.bashrc:~/.brushrc # Make it obvious which shell this is.PS1='brush\$ 'Type
exitand startbrushagain; you should get the new prompt, while Bash keeps the old one.
The ~/.brushrc prompt applies only to a non-login brush, which is what
you’ve been running. A login shell
(brush -l) reads different files; see
which files are read.
Next steps
Section titled “Next steps”- Configure brush — which file a setting belongs in
- Set up bash-completion — extended completions for common commands
Open source under the MIT license. Built in the open by the brush community.