Interactive shell vs scripting shell (2026)

By Xah Lee. Date: .

interactive shell vs scripting shell

had a realization.

interactive shell needs not to be the same as scripting shell. e.g. you can use bash, zsh, interactively, and use python, ruby, fsharp to do scripting. this is very common since 1990s with perl.

also, you can use emacs dired, or midnight commander, as interactive shell. also very common since 1990s.

the significance of this is that, since they can be 2 separate things, the scripting lang does not need to have restraints of the interactive shell, namely, the linear syntax.

command-line interactive shell, such as bash zsh PowerShell, require a linear syntax. i.e. you want to be able to do things in a single line. Opposite would be python requiring multi-line indentation or lisp syntax.

now, linear syntax is a major restraint on the programing language syntax, i think, though i have not explored it in depth.

but since interactive shell and scripting shell don't need be the same, so the scripting shell don't need to have linear syntax.

Shell Languages and the Linearization of Syntax