From 1ba1d6cb2a42d4ed495235a4f178c6f9866f958a Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Thu, 6 Jun 2019 10:58:39 -0700 Subject: [PATCH] Added philosophy.md --- docs/philosophy.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/philosophy.md diff --git a/docs/philosophy.md b/docs/philosophy.md new file mode 100644 index 0000000000..55ee2cabef --- /dev/null +++ b/docs/philosophy.md @@ -0,0 +1,30 @@ +> This document contains philosophical notes about nu. + +# Bare Words + +In Nu, bare words work the same way they do in most shells. + +In most shells, bare words serve two purposes: + +``` +$ ls +# ^^ the name of a command +$ cat Cargo.toml +# ^^^^^^^^^^ a string +``` + +Nu adopts this shell idiom. + +Consequences: + +- Bare words cannot also refer to variables. Variable names are prefixed with `$`. +- Bare words, in almost all contexts, cannot be keywords. +- Numbers and operators aren't bare words. + +# One Screen + +The utility of a command's output drops off extremely rapidly after a screenful of content. + +By default, Nu prefers to present output that can fit into a screen rather than more complete output that spans many screens. + +For example, this is the rationale for `ls` returning a flat table containing the files in the current directory, rather than presenting a tree of data by default.