Skip to content
Snippets Groups Projects
Commit 8d37ae1e authored by AdminXVII's avatar AdminXVII Committed by Michael Aaron Murphy
Browse files

manual: Add migration guide

parent dbf603c5
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@
- [Introduction](introduction.md)
- [Migrating from POSIX shells](migration.md)
- [Miscellaneous](misc/index.md)
- [Implicit `cd`](misc/01-implicitcd.md)
......@@ -20,6 +22,7 @@
- [Arithmetic Variables](variables/04-arithmetic.md)
- [Exporting Variables](variables/05-exporting.md)
- [Scopes](variables/06-scopes.md)
- [Namespaces (colors, scopes and env vars)](variables/07-namespaces.md)
- [Expansions](expansions/00-expansions.md)
......
# Migrating from POSIX Shells
## Notable changes
- Arrays are full-class citizens, using the @ sigil. That means emails and git urls must be quoted
- The shell has proper scopes (variables get unset after the end of the definition scope), and functions are closures
- The shell has an internal variable store. That means environment variables must be explicitely exported to be available to commands.
- For now, per-command environment variables are not supported (ex: `LANG=it_CH.utf8 man man`)
- The testing builtin (`[[ .. ]]`) was replaced with `test`, `exists`, and/or other commands
- The control flow have been revisited, see the relevant part of the manual
## Customizing your prompt
- Define the PROMPT function to be called whenever the prompte needs to be drawn. Simply print the prompt to stdout in the function (printf or git branch directly)
- Variables are defined with all the colors (see the namespaces manual page for all details). This means you don't have to deal with all the escape codes directly. No more `\x033[33;m`, instead it's `${color::yellow}`.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment