-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathash.txt
66 lines (54 loc) · 1.67 KB
/
ash.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Ash sets at least the following shell variables:
PPID
PWD
OPTIND
Ash sets the following command in certain situations or depending on the build
cconfiguration:
OLDPWD
RANDOM
CDPATH
Ash reads and honors the following environment variables (some support
dependens on build settings):
HOME
HISTFILE
HISTFILESIZE
MAIL
MAILPATH
PS1
PS2
PS4
LC_ALL
LC_CTYPE
LANG
Escape sequences supported in $PS1:
\a ASCII bell character (07)
\e ASCII escape character (033)
\n newline
\r carriage return
\\ backslash
\nnn char with octal code nnn
\$ if the effective UID is 0, a #, otherwise a $
\w current working directory, with $HOME abbreviated with a tilde
Note: we do not support $PROMPT_DIRTRIM=n feature
\W basename of the current working directory, with $HOME abbreviated with
a tillde
\h hostname up to the first '.'
\H hostname
\u username
\[ begin a sequence of non-printing characters
\] end a sequence of non-printing characters
\A current time in 24-hour HH:MM format
\t for (weak) compatibility with other shells only: does the same as \A
\T same as \t
\@ same as \t
Also, command substitution with backquotes is supported in $PS1.
The read builtin supports the following options:
-r Do not interpret '\' specially
-s Turn off echo (tty only)
-n NCHARS Read NCHARS max
-p PROMPT Display PROMPT on stderr (if input is from tty)
-t SECONDS Timeout after SECONDS (tty or pipe only)
-u FD Read from given FD instead of fd 0
Some notes on built-in commands:
"cd" fully supports the "-" argument, $OLDPWD and $CDPATH as explained in the
POSIX standard. Many people do not know about this useful POSIX feature.