Input routing
Parolsh never guesses whether a line is English or a shell command. The first character decides, always:
| Input | Route |
|---|---|
text | The active ACP agent |
/command | The active ACP agent, unchanged |
!command | The configured shell, default bash -ic |
!bash | An interactive Bash session |
#command | Parolsh itself |
find files modified today is always a question for the agent. To run the
Unix find, type !find . -mtime -1.
!command
The command runs as bash -ic "<command>" in Parolsh's current directory.
- Your
~/.bashrcis loaded, so aliases, functions and shell options work as in your normal terminal. The shell is interactive (-i) because a plainbash -cignores aliases, and the stock Debian/Ubuntu~/.bashrcstops right away when the shell is not interactive. - Each command is independent.
!cd /tmpor!export FOO=1change nothing in Parolsh: the command runs and returns. Use#cdto change directory, or!bashfor a session that keeps its state. - Commands stay out of your bash history. Parolsh sets
HISTFILE=/dev/nullfor them and keeps its own history. - A non-zero exit code is printed after the output, for example
exit 1. Ctrl+Cstops the running command, not Parolsh.- Parolsh has no job control. With the default
bash -ic,Ctrl+Zis handled by that bash, as if you had typed the line in bash: the running program is paused (Stopped), the rest of the line continues, and the paused program ends when the command finishes. With a non-interactiveshellsuch as["bash", "-c"], Parolsh resumes the command right away. Use!bashwhen you need job control.
Loading ~/.bashrc costs a little time on every command (about 0.17 s on a
typical Ubuntu setup). Anything ~/.bashrc or /etc/bash.bashrc prints also
shows up in the output.
The shell is configurable, see Configuration:
shell = ["zsh", "-ic"]
!bash
Opens a real interactive Bash in the current directory, with your full
~/.bashrc and completions. exit returns to Parolsh, in the directory it was
in before: changes made inside the session stay there.
Text
Anything that does not start with !, # or / is a question for the
agent. The answer is printed as it arrives, with a status line showing what
the agent is doing (see During a turn). Ctrl+C
cancels the turn.
/command
Lines starting with / belong to the agent. Parolsh reserves no / commands
and forwards the line as typed, so the agent's own slash commands work.
#command
| Command | What it does |
|---|---|
#help | Show the input rules and commands |
#new | Start a new conversation with the agent, in the current directory |
#cd <path> | Change Parolsh's directory and start a new conversation there. ~ and relative paths work; no path means your home directory. Reloads the configuration of the project found there. An agent chosen with #agent stays when that project configures it; otherwise the project's default_agent is used, and the agent restarts if it changed. |
#agent | Show the agent in use |
#agent list | List configured agents; * marks the one in use |
#agent <name> | Switch to another configured agent, with a new conversation. default_agent does not change. |
#prompt | Show the prompt style in use |
#prompt <name> | Switch the prompt: parolsh, starship or minimal, until you leave Parolsh |
#project | Show the project root |
#project init | Create .parolsh/ in the current directory |
#exit | Leave Parolsh (Ctrl+D also works) |