aboutsummaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-10-05 12:23:12 -0700
committerElliott Hughes <enh@google.com>2019-10-05 12:24:01 -0700
commit6fd80576c4ee9361186d75a59b82bc9320684c0c (patch)
tree98460220f1d828e65f91b5974c5744e71a2148aa /android
parentabf8fcdcbec73858d019de4e6a774d4080881881 (diff)
parent3d0bb23d74f7ce3555dee6545a1e805aaf3d360e (diff)
downloadtoybox-6fd80576c4ee9361186d75a59b82bc9320684c0c.tar.gz
Merge remote-tracking branch 'toybox/master' into HEADndk-sysroot-r21
Change-Id: I8e69619b347cad6a18d5f5c1d620b906da099e54
Diffstat (limited to 'android')
-rw-r--r--android/device/generated/flags.h44
-rw-r--r--android/device/generated/globals.h14
-rw-r--r--android/device/generated/help.h12
-rw-r--r--android/device/generated/newtoys.h14
-rw-r--r--android/linux/generated/flags.h44
-rw-r--r--android/linux/generated/globals.h14
-rw-r--r--android/linux/generated/help.h12
-rw-r--r--android/linux/generated/newtoys.h14
-rw-r--r--android/mac/generated/flags.h44
-rw-r--r--android/mac/generated/globals.h14
-rw-r--r--android/mac/generated/help.h12
-rw-r--r--android/mac/generated/newtoys.h14
12 files changed, 159 insertions, 93 deletions
diff --git a/android/device/generated/flags.h b/android/device/generated/flags.h
index 4def28fd..2254fb80 100644
--- a/android/device/generated/flags.h
+++ b/android/device/generated/flags.h
@@ -76,9 +76,9 @@
#undef FLAG_d
#endif
-// basename <1as: <1as:
+// basename ^<1as: ^<1as:
#undef OPTSTR_basename
-#define OPTSTR_basename "<1as:"
+#define OPTSTR_basename "^<1as:"
#ifdef CLEANUP_basename
#undef CLEANUP_basename
#undef FOR_basename
@@ -1106,9 +1106,9 @@
#undef FLAG_c
#endif
-// gzip cdfk123456789[-123456789] cdfk123456789[-123456789]
+// gzip ncdfk123456789[-123456789] ncdfk123456789[-123456789]
#undef OPTSTR_gzip
-#define OPTSTR_gzip "cdfk123456789[-123456789]"
+#define OPTSTR_gzip "ncdfk123456789[-123456789]"
#ifdef CLEANUP_gzip
#undef CLEANUP_gzip
#undef FOR_gzip
@@ -1125,6 +1125,7 @@
#undef FLAG_f
#undef FLAG_d
#undef FLAG_c
+#undef FLAG_n
#endif
// head ?n(lines)#<0=10c(bytes)#<0qv[-nc] ?n(lines)#<0=10c(bytes)#<0qv[-nc]
@@ -1479,9 +1480,9 @@
#undef FOR_link
#endif
-// ln <1vnfs <1vnfs
+// ln <1t:Tvnfs <1t:Tvnfs
#undef OPTSTR_ln
-#define OPTSTR_ln "<1vnfs"
+#define OPTSTR_ln "<1t:Tvnfs"
#ifdef CLEANUP_ln
#undef CLEANUP_ln
#undef FOR_ln
@@ -1489,6 +1490,8 @@
#undef FLAG_f
#undef FLAG_n
#undef FLAG_v
+#undef FLAG_T
+#undef FLAG_t
#endif
// load_policy <1>1 <1>1
@@ -1797,9 +1800,9 @@
#undef FLAG_L
#endif
-// mktemp >1uqd(directory)p(tmpdir):t >1uqd(directory)p(tmpdir):t
+// mktemp >1(tmpdir);:uqd(directory)p:t >1(tmpdir);:uqd(directory)p:t
#undef OPTSTR_mktemp
-#define OPTSTR_mktemp ">1uqd(directory)p(tmpdir):t"
+#define OPTSTR_mktemp ">1(tmpdir);:uqd(directory)p:t"
#ifdef CLEANUP_mktemp
#undef CLEANUP_mktemp
#undef FOR_mktemp
@@ -1808,6 +1811,7 @@
#undef FLAG_d
#undef FLAG_q
#undef FLAG_u
+#undef FLAG_tmpdir
#endif
// modinfo <1b:k:F:0 <1b:k:F:0
@@ -2257,9 +2261,9 @@
#undef FOR_readahead
#endif
-// readlink <1>1nqmef(canonicalize)[-mef] <1>1nqmef(canonicalize)[-mef]
+// readlink <1nqmef(canonicalize)[-mef] <1nqmef(canonicalize)[-mef]
#undef OPTSTR_readlink
-#define OPTSTR_readlink "<1>1nqmef(canonicalize)[-mef]"
+#define OPTSTR_readlink "<1nqmef(canonicalize)[-mef]"
#ifdef CLEANUP_readlink
#undef CLEANUP_readlink
#undef FOR_readlink
@@ -2351,13 +2355,14 @@
#undef FLAG_f
#endif
-// rmdir <1p <1p
+// rmdir <1(ignore-fail-on-non-empty)p <1(ignore-fail-on-non-empty)p
#undef OPTSTR_rmdir
-#define OPTSTR_rmdir "<1p"
+#define OPTSTR_rmdir "<1(ignore-fail-on-non-empty)p"
#ifdef CLEANUP_rmdir
#undef CLEANUP_rmdir
#undef FOR_rmdir
#undef FLAG_p
+#undef FLAG_ignore_fail_on_non_empty
#endif
// rmmod <1wf <1wf
@@ -3251,13 +3256,14 @@
#undef FLAG_m
#endif
-// wget f:
+// wget (no-check-certificate)O:
#undef OPTSTR_wget
-#define OPTSTR_wget "f:"
+#define OPTSTR_wget "(no-check-certificate)O:"
#ifdef CLEANUP_wget
#undef CLEANUP_wget
#undef FOR_wget
-#undef FLAG_f
+#undef FLAG_O
+#undef FLAG_no_check_certificate
#endif
// which <1a <1a
@@ -4294,6 +4300,7 @@
#define FLAG_f (1<<10)
#define FLAG_d (1<<11)
#define FLAG_c (1<<12)
+#define FLAG_n (1<<13)
#endif
#ifdef FOR_head
@@ -4594,6 +4601,8 @@
#define FLAG_f (1<<1)
#define FLAG_n (1<<2)
#define FLAG_v (1<<3)
+#define FLAG_T (1<<4)
+#define FLAG_t (1<<5)
#endif
#ifdef FOR_load_policy
@@ -4859,6 +4868,7 @@
#define FLAG_d (1<<2)
#define FLAG_q (1<<3)
#define FLAG_u (1<<4)
+#define FLAG_tmpdir (1<<5)
#endif
#ifdef FOR_modinfo
@@ -5323,6 +5333,7 @@
#define TT this.rmdir
#endif
#define FLAG_p (1<<0)
+#define FLAG_ignore_fail_on_non_empty (1<<1)
#endif
#ifdef FOR_rmmod
@@ -6078,7 +6089,8 @@
#ifndef TT
#define TT this.wget
#endif
-#define FLAG_f (FORCED_FLAG<<0)
+#define FLAG_O (FORCED_FLAG<<0)
+#define FLAG_no_check_certificate (FORCED_FLAG<<1)
#endif
#ifdef FOR_which
diff --git a/android/device/generated/globals.h b/android/device/generated/globals.h
index 204e3448..dfa399ca 100644
--- a/android/device/generated/globals.h
+++ b/android/device/generated/globals.h
@@ -92,7 +92,7 @@ struct mknod_data {
// toys/lsb/mktemp.c
struct mktemp_data {
- char *p;
+ char *p, *tmpdir;
};
// toys/lsb/mount.c
@@ -421,7 +421,6 @@ struct timeout_data {
pid_t pid;
struct timeval ktv;
struct itimerval itv;
- int signaled;
};
// toys/other/truncate.c
@@ -960,6 +959,9 @@ struct useradd_data {
struct vi_data {
int cur_col;
int cur_row;
+ int scr_row;
+ int drawn_row;
+ int drawn_col;
unsigned screen_height;
unsigned screen_width;
int vi_mode;
@@ -970,6 +972,7 @@ struct vi_data {
char vi_reg;
char *last_search;
int tabstop;
+ int list;
};
// toys/pending/wget.c
@@ -1153,6 +1156,12 @@ struct kill_data {
struct arg_list *o;
};
+// toys/posix/ln.c
+
+struct ln_data {
+ char *t;
+};
+
// toys/posix/logger.c
struct logger_data {
@@ -1539,6 +1548,7 @@ extern union global_union {
struct iconv_data iconv;
struct id_data id;
struct kill_data kill;
+ struct ln_data ln;
struct logger_data logger;
struct ls_data ls;
struct mkdir_data mkdir;
diff --git a/android/device/generated/help.h b/android/device/generated/help.h
index 7736f5aa..6902208b 100644
--- a/android/device/generated/help.h
+++ b/android/device/generated/help.h
@@ -188,7 +188,7 @@
#define HELP_realpath "usage: realpath FILE...\n\nDisplay the canonical absolute pathname"
-#define HELP_readlink "usage: readlink FILE\n\nWith no options, show what symlink points to, return error if not symlink.\n\nOptions for producing canonical paths (all symlinks/./.. resolved):\n\n-e Canonical path to existing entry (fail if missing)\n-f Full path (fail if directory missing)\n-m Ignore missing entries, show where it would be\n-n No trailing newline\n-q Quiet (no output, just error code)"
+#define HELP_readlink "usage: readlink FILE...\n\nWith no options, show what symlink points to, return error if not symlink.\n\nOptions for producing canonical paths (all symlinks/./.. resolved):\n\n-e Canonical path to existing entry (fail if missing)\n-f Full path (fail if directory missing)\n-m Ignore missing entries, show where it would be\n-n No trailing newline\n-q Quiet (no output, just error code)"
#define HELP_readahead "usage: readahead FILE...\n\nPreload files into disk cache."
@@ -316,7 +316,7 @@
#define HELP_xzcat "usage: xzcat [filename...]\n\nDecompress listed files to stdout. Use stdin if no files listed."
-#define HELP_wget "usage: wget -f filename URL\n-f filename: specify the filename to be saved\nURL: HTTP uniform resource location and only HTTP, not HTTPS\n\nexamples:\n wget -f index.html http://www.example.com\n wget -f sample.jpg http://www.example.com:8080/sample.jpg"
+#define HELP_wget "usage: wget -O filename URL\n-O filename: specify output filename\nURL: uniform resource location, FTP/HTTP only, not HTTPS\n\nexamples:\n wget -O index.html http://www.example.com\n wget -O sample.jpg ftp://ftp.example.com:21/sample.jpg"
#define HELP_vi "usage: vi FILE\nVisual text editor. Predates the existence of standardized cursor keys,\nso the controls are weird and historical."
@@ -478,7 +478,7 @@
#define HELP_sed "usage: sed [-inrzE] [-e SCRIPT]...|SCRIPT [-f SCRIPT_FILE]... [FILE...]\n\nStream editor. Apply one or more editing SCRIPTs to each line of input\n(from FILE or stdin) producing output (by default to stdout).\n\n-e Add SCRIPT to list\n-f Add contents of SCRIPT_FILE to list\n-i Edit each file in place (-iEXT keeps backup file with extension EXT)\n-n No default output (use the p command to output matched lines)\n-r Use extended regular expression syntax\n-E POSIX alias for -r\n-s Treat input files separately (implied by -i)\n-z Use \\0 rather than \\n as the input line separator\n\nA SCRIPT is a series of one or more COMMANDs separated by newlines or\nsemicolons. All -e SCRIPTs are concatenated together as if separated\nby newlines, followed by all lines from -f SCRIPT_FILEs, in order.\nIf no -e or -f SCRIPTs are specified, the first argument is the SCRIPT.\n\nEach COMMAND may be preceded by an address which limits the command to\napply only to the specified line(s). Commands without an address apply to\nevery line. Addresses are of the form:\n\n [ADDRESS[,ADDRESS]][!]COMMAND\n\nThe ADDRESS may be a decimal line number (starting at 1), a /regular\nexpression/ within a pair of forward slashes, or the character \"$\" which\nmatches the last line of input. (In -s or -i mode this matches the last\nline of each file, otherwise just the last line of the last file.) A single\naddress matches one line, a pair of comma separated addresses match\neverything from the first address to the second address (inclusive). If\nboth addresses are regular expressions, more than one range of lines in\neach file can match. The second address can be +N to end N lines later.\n\nREGULAR EXPRESSIONS in sed are started and ended by the same character\n(traditionally / but anything except a backslash or a newline works).\nBackslashes may be used to escape the delimiter if it occurs in the\nregex, and for the usual printf escapes (\\abcefnrtv and octal, hex,\nand unicode). An empty regex repeats the previous one. ADDRESS regexes\n(above) require the first delimiter to be escaped with a backslash when\nit isn't a forward slash (to distinguish it from the COMMANDs below).\n\nSed mostly operates on individual lines one at a time. It reads each line,\nprocesses it, and either writes it to the output or discards it before\nreading the next line. Sed can remember one additional line in a separate\nbuffer (using the h, H, g, G, and x commands), and can read the next line\nof input early (using the n and N command), but other than that command\nscripts operate on individual lines of text.\n\nEach COMMAND starts with a single character. The following commands take\nno arguments:\n\n ! Run this command when the test _didn't_ match.\n\n { Start a new command block, continuing until a corresponding \"}\".\n Command blocks may nest. If the block has an address, commands within\n the block are only run for lines within the block's address range.\n\n } End command block (this command cannot have an address)\n\n d Delete this line and move on to the next one\n (ignores remaining COMMANDs)\n\n D Delete one line of input and restart command SCRIPT (same as \"d\"\n unless you've glued lines together with \"N\" or similar)\n\n g Get remembered line (overwriting current line)\n\n G Get remembered line (appending to current line)\n\n h Remember this line (overwriting remembered line)\n\n H Remember this line (appending to remembered line, if any)\n\n l Print line, escaping \\abfrtv (but not newline), octal escaping other\n nonprintable characters, wrapping lines to terminal width with a\n backslash, and appending $ to actual end of line.\n\n n Print default output and read next line, replacing current line\n (If no next line available, quit processing script)\n\n N Append next line of input to this line, separated by a newline\n (This advances the line counter for address matching and \"=\", if no\n next line available quit processing script without default output)\n\n p Print this line\n\n P Print this line up to first newline (from \"N\")\n\n q Quit (print default output, no more commands processed or lines read)\n\n x Exchange this line with remembered line (overwrite in both directions)\n\n = Print the current line number (followed by a newline)\n\nThe following commands (may) take an argument. The \"text\" arguments (to\nthe \"a\", \"b\", and \"c\" commands) may end with an unescaped \"\\\" to append\nthe next line (for which leading whitespace is not skipped), and also\ntreat \";\" as a literal character (use \"\\;\" instead).\n\n a [text] Append text to output before attempting to read next line\n\n b [label] Branch, jumps to :label (or with no label, to end of SCRIPT)\n\n c [text] Delete line, output text at end of matching address range\n (ignores remaining COMMANDs)\n\n i [text] Print text\n\n r [file] Append contents of file to output before attempting to read\n next line.\n\n s/S/R/F Search for regex S, replace matched text with R using flags F.\n The first character after the \"s\" (anything but newline or\n backslash) is the delimiter, escape with \\ to use normally.\n\n The replacement text may contain \"&\" to substitute the matched\n text (escape it with backslash for a literal &), or \\1 through\n \\9 to substitute a parenthetical subexpression in the regex.\n You can also use the normal backslash escapes such as \\n and\n a backslash at the end of the line appends the next line.\n\n The flags are:\n\n [0-9] A number, substitute only that occurrence of pattern\n g Global, substitute all occurrences of pattern\n i Ignore case when matching\n p Print the line if match was found and replaced\n w [file] Write (append) line to file if match replaced\n\n t [label] Test, jump to :label only if an \"s\" command found a match in\n this line since last test (replacing with same text counts)\n\n T [label] Test false, jump only if \"s\" hasn't found a match.\n\n w [file] Write (append) line to file\n\n y/old/new/ Change each character in 'old' to corresponding character\n in 'new' (with standard backslash escapes, delimiter can be\n any repeated character except \\ or \\n)\n\n : [label] Labeled target for jump commands\n\n # Comment, ignore rest of this line of SCRIPT\n\nDeviations from POSIX: allow extended regular expressions with -r,\nediting in place with -i, separate with -s, NUL-separated input with -z,\nprintf escapes in text, line continuations, semicolons after all commands,\n2-address anywhere an address is allowed, \"T\" command, multiline\ncontinuations for [abc], \\; to end [abc] argument before end of line."
-#define HELP_rmdir "usage: rmdir [-p] [dirname...]\n\nRemove one or more directories.\n\n-p Remove path"
+#define HELP_rmdir "usage: rmdir [-p] [dirname...]\n\nRemove one or more directories.\n\n-p Remove path\n--ignore-fail-on-non-empty Ignore failures caused by non-empty directories"
#define HELP_rm "usage: rm [-fiRrv] FILE...\n\nRemove each argument from the filesystem.\n\n-f Force: remove without confirmation, no error if it doesn't exist\n-i Interactive: prompt for confirmation\n-rR Recursive: remove directory contents\n-v Verbose"
@@ -520,7 +520,7 @@
#define HELP_logger "usage: logger [-s] [-t TAG] [-p [FACILITY.]PRIORITY] [message...]\n\nLog message (or stdin) to syslog.\n\n-s Also write message to stderr\n-t Use TAG instead of username to identify message source\n-p Specify PRIORITY with optional FACILITY. Default is \"user.notice\""
-#define HELP_ln "usage: ln [-sfnv] [FROM...] TO\n\nCreate a link between FROM and TO.\nWith only one argument, create link in current directory.\n\n-s Create a symbolic link\n-f Force the creation of the link, even if TO already exists\n-n Symlink at destination treated as file\n-v Verbose"
+#define HELP_ln "usage: ln [-sfnv] [-t DIR] [FROM...] TO\n\nCreate a link between FROM and TO.\nOne/two/many arguments work like \"mv\" or \"cp\".\n\n-s Create a symbolic link\n-f Force the creation of the link, even if TO already exists\n-n Symlink at TO treated as file\n-t Create links in DIR\n-T TO always treated as file, max 2 arguments\n-v Verbose"
#define HELP_link "usage: link FILE NEWLINK\n\nCreate hardlink to a file."
@@ -544,9 +544,9 @@
#define HELP_getconf "usage: getconf -a [PATH] | -l | NAME [PATH]\n\nGet system configuration values. Values from pathconf(3) require a path.\n\n-a Show all (defaults to \"/\" if no path given)\n-l List available value names (grouped by source)"
-#define HELP_find "usage: find [-HL] [DIR...] [<options>]\n\nSearch directories for matching files.\nDefault: search \".\", match all, -print matches.\n\n-H Follow command line symlinks -L Follow all symlinks\n\nMatch filters:\n-name PATTERN filename with wildcards (-iname case insensitive)\n-path PATTERN path name with wildcards (-ipath case insensitive)\n-user UNAME belongs to user UNAME -nouser user ID not known\n-group GROUP belongs to group GROUP -nogroup group ID not known\n-perm [-/]MODE permissions (-=min /=any) -prune ignore dir contents\n-size N[c] 512 byte blocks (c=bytes) -xdev only this filesystem\n-links N hardlink count -atime N[u] accessed N units ago\n-ctime N[u] created N units ago -mtime N[u] modified N units ago\n-newer FILE newer mtime than FILE -mindepth N at least N dirs down\n-depth ignore contents of dir -maxdepth N at most N dirs down\n-inum N inode number N -empty empty files and dirs\n-type [bcdflps] type is (block, char, dir, file, symlink, pipe, socket)\n-true always true -false always false\n-context PATTERN security context\n\nNumbers N may be prefixed by a - (less than) or + (greater than). Units for\n-Xtime are d (days, default), h (hours), m (minutes), or s (seconds).\n\nCombine matches with:\n!, -a, -o, ( ) not, and, or, group expressions\n\nActions:\n-print Print match with newline -print0 Print match with null\n-exec Run command with path -execdir Run command in file's dir\n-ok Ask before exec -okdir Ask before execdir\n-delete Remove matching file/dir -printf FORMAT Print using format string\n\nCommands substitute \"{}\" with matched file. End with \";\" to run each file,\nor \"+\" (next argument after \"{}\") to collect and run with multiple files.\n\n-printf FORMAT characters are \\ escapes and:\n%b 512 byte blocks used\n%f basename %g textual gid %G numeric gid\n%i decimal inode %l target of symlink %m octal mode\n%M ls format type/mode %p path to file %P path to file minus DIR\n%s size in bytes %T@ mod time as unixtime\n%u username %U numeric uid %Z security context"
+#define HELP_find "usage: find [-HL] [DIR...] [<options>]\n\nSearch directories for matching files.\nDefault: search \".\", match all, -print matches.\n\n-H Follow command line symlinks -L Follow all symlinks\n\nMatch filters:\n-name PATTERN filename with wildcards (-iname case insensitive)\n-path PATTERN path name with wildcards (-ipath case insensitive)\n-user UNAME belongs to user UNAME -nouser user ID not known\n-group GROUP belongs to group GROUP -nogroup group ID not known\n-perm [-/]MODE permissions (-=min /=any) -prune ignore dir contents\n-size N[c] 512 byte blocks (c=bytes) -xdev only this filesystem\n-links N hardlink count -atime N[u] accessed N units ago\n-ctime N[u] created N units ago -mtime N[u] modified N units ago\n-newer FILE newer mtime than FILE -mindepth N at least N dirs down\n-depth ignore contents of dir -maxdepth N at most N dirs down\n-inum N inode number N -empty empty files and dirs\n-type [bcdflps] type is (block, char, dir, file, symlink, pipe, socket)\n-true always true -false always false\n-context PATTERN security context\n-newerXY FILE X=acm time > FILE's Y=acm time (Y=t: FILE is literal time)\n\nNumbers N may be prefixed by a - (less than) or + (greater than). Units for\n-Xtime are d (days, default), h (hours), m (minutes), or s (seconds).\n\nCombine matches with:\n!, -a, -o, ( ) not, and, or, group expressions\n\nActions:\n-print Print match with newline -print0 Print match with null\n-exec Run command with path -execdir Run command in file's dir\n-ok Ask before exec -okdir Ask before execdir\n-delete Remove matching file/dir -printf FORMAT Print using format string\n\nCommands substitute \"{}\" with matched file. End with \";\" to run each file,\nor \"+\" (next argument after \"{}\") to collect and run with multiple files.\n\n-printf FORMAT characters are \\ escapes and:\n%b 512 byte blocks used\n%f basename %g textual gid %G numeric gid\n%i decimal inode %l target of symlink %m octal mode\n%M ls format type/mode %p path to file %P path to file minus DIR\n%s size in bytes %T@ mod time as unixtime\n%u username %U numeric uid %Z security context"
-#define HELP_file "usage: file [-bhL] [file...]\n\nExamine the given files and describe their content types.\n\n-b Brief (no filename)\n-h Don't follow symlinks (default)\n-L Follow symlinks\n-s show block/char device contents"
+#define HELP_file "usage: file [-bhLs] [file...]\n\nExamine the given files and describe their content types.\n\n-b Brief (no filename)\n-h Don't follow symlinks (default)\n-L Follow symlinks\n-s Show block/char device contents"
#define HELP_false "Return nonzero."
diff --git a/android/device/generated/newtoys.h b/android/device/generated/newtoys.h
index 12f9d164..0f6410a6 100644
--- a/android/device/generated/newtoys.h
+++ b/android/device/generated/newtoys.h
@@ -11,7 +11,7 @@ USE_ARP(NEWTOY(arp, "vi:nDsdap:A:H:[+Ap][!sd]", TOYFLAG_USR|TOYFLAG_BIN))
USE_ARPING(NEWTOY(arping, "<1>1s:I:w#<0c#<0AUDbqf[+AU][+Df]", TOYFLAG_USR|TOYFLAG_SBIN))
USE_ASCII(NEWTOY(ascii, 0, TOYFLAG_USR|TOYFLAG_BIN))
USE_BASE64(NEWTOY(base64, "diw#<0=76[!dw]", TOYFLAG_USR|TOYFLAG_BIN))
-USE_BASENAME(NEWTOY(basename, "<1as:", TOYFLAG_USR|TOYFLAG_BIN))
+USE_BASENAME(NEWTOY(basename, "^<1as:", TOYFLAG_USR|TOYFLAG_BIN))
USE_SH(OLDTOY(bash, sh, TOYFLAG_BIN))
USE_BC(NEWTOY(bc, "i(interactive)l(mathlib)q(quiet)s(standard)w(warn)", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
USE_BLKID(NEWTOY(blkid, "ULs*[!LU]", TOYFLAG_BIN))
@@ -97,7 +97,7 @@ USE_GROUPADD(NEWTOY(groupadd, "<1>2g#<0S", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
USE_GROUPDEL(NEWTOY(groupdel, "<1>2", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
USE_GROUPS(NEWTOY(groups, NULL, TOYFLAG_USR|TOYFLAG_BIN))
USE_GUNZIP(NEWTOY(gunzip, "cdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN))
-USE_GZIP(NEWTOY(gzip, "cdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_GZIP(NEWTOY(gzip, "ncdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN))
USE_REBOOT(OLDTOY(halt, reboot, TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
USE_HEAD(NEWTOY(head, "?n(lines)#<0=10c(bytes)#<0qv[-nc]", TOYFLAG_USR|TOYFLAG_BIN))
USE_HELLO(NEWTOY(hello, 0, TOYFLAG_USR|TOYFLAG_BIN))
@@ -135,7 +135,7 @@ USE_KILLALL5(NEWTOY(killall5, "?o*ls: [!lo][!ls]", TOYFLAG_SBIN))
USE_KLOGD(NEWTOY(klogd, "c#<1>8n", TOYFLAG_SBIN))
USE_LAST(NEWTOY(last, "f:W", TOYFLAG_BIN))
USE_LINK(NEWTOY(link, "<2>2", TOYFLAG_USR|TOYFLAG_BIN))
-USE_LN(NEWTOY(ln, "<1vnfs", TOYFLAG_BIN))
+USE_LN(NEWTOY(ln, "<1t:Tvnfs", TOYFLAG_BIN))
USE_LOAD_POLICY(NEWTOY(load_policy, "<1>1", TOYFLAG_USR|TOYFLAG_SBIN))
USE_LOG(NEWTOY(log, "<1p:t:", TOYFLAG_USR|TOYFLAG_SBIN))
USE_LOGGER(NEWTOY(logger, "st:p:", TOYFLAG_USR|TOYFLAG_BIN))
@@ -162,7 +162,7 @@ USE_MKFIFO(NEWTOY(mkfifo, "<1"USE_MKFIFO_Z("Z:")"m:", TOYFLAG_USR|TOYFLAG_BIN))
USE_MKNOD(NEWTOY(mknod, "<2>4m(mode):"USE_MKNOD_Z("Z:"), TOYFLAG_BIN|TOYFLAG_UMASK))
USE_MKPASSWD(NEWTOY(mkpasswd, ">2S:m:P#=0<0", TOYFLAG_USR|TOYFLAG_BIN))
USE_MKSWAP(NEWTOY(mkswap, "<1>1L:", TOYFLAG_SBIN))
-USE_MKTEMP(NEWTOY(mktemp, ">1uqd(directory)p(tmpdir):t", TOYFLAG_BIN))
+USE_MKTEMP(NEWTOY(mktemp, ">1(tmpdir);:uqd(directory)p:t", TOYFLAG_BIN))
USE_MODINFO(NEWTOY(modinfo, "<1b:k:F:0", TOYFLAG_SBIN))
USE_MODPROBE(NEWTOY(modprobe, "alrqvsDbd*", TOYFLAG_SBIN))
USE_MORE(NEWTOY(more, 0, TOYFLAG_USR|TOYFLAG_BIN))
@@ -201,7 +201,7 @@ USE_PS(NEWTOY(ps, "k(sort)*P(ppid)*aAdeflMno*O*p(pid)*s*t*Tu*U*g*G*wZ[!ol][+Ae][
USE_PWD(NEWTOY(pwd, ">0LP[-LP]", TOYFLAG_BIN))
USE_PWDX(NEWTOY(pwdx, "<1a", TOYFLAG_USR|TOYFLAG_BIN))
USE_READAHEAD(NEWTOY(readahead, NULL, TOYFLAG_BIN))
-USE_READLINK(NEWTOY(readlink, "<1>1nqmef(canonicalize)[-mef]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_READLINK(NEWTOY(readlink, "<1nqmef(canonicalize)[-mef]", TOYFLAG_USR|TOYFLAG_BIN))
USE_REALPATH(NEWTOY(realpath, "<1", TOYFLAG_USR|TOYFLAG_BIN))
USE_REBOOT(NEWTOY(reboot, "fn", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
USE_RENICE(NEWTOY(renice, "<1gpun#|", TOYFLAG_USR|TOYFLAG_BIN))
@@ -210,7 +210,7 @@ USE_RESTORECON(NEWTOY(restorecon, "<1DFnRrv", TOYFLAG_USR|TOYFLAG_SBIN))
USE_REV(NEWTOY(rev, NULL, TOYFLAG_USR|TOYFLAG_BIN))
USE_RFKILL(NEWTOY(rfkill, "<1>2", TOYFLAG_USR|TOYFLAG_SBIN))
USE_RM(NEWTOY(rm, "fiRrv[-fi]", TOYFLAG_BIN))
-USE_RMDIR(NEWTOY(rmdir, "<1p", TOYFLAG_BIN))
+USE_RMDIR(NEWTOY(rmdir, "<1(ignore-fail-on-non-empty)p", TOYFLAG_BIN))
USE_RMMOD(NEWTOY(rmmod, "<1wf", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
USE_ROUTE(NEWTOY(route, "?neA:", TOYFLAG_BIN))
USE_RUNCON(NEWTOY(runcon, "<2", TOYFLAG_USR|TOYFLAG_SBIN))
@@ -288,7 +288,7 @@ USE_VMSTAT(NEWTOY(vmstat, ">2n", TOYFLAG_BIN))
USE_W(NEWTOY(w, NULL, TOYFLAG_USR|TOYFLAG_BIN))
USE_WATCH(NEWTOY(watch, "^<1n%<100=2000tebx", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
USE_WC(NEWTOY(wc, "mcwl", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
-USE_WGET(NEWTOY(wget, "f:", TOYFLAG_USR|TOYFLAG_BIN))
+USE_WGET(NEWTOY(wget, "(no-check-certificate)O:", TOYFLAG_USR|TOYFLAG_BIN))
USE_WHICH(NEWTOY(which, "<1a", TOYFLAG_USR|TOYFLAG_BIN))
USE_WHO(NEWTOY(who, "a", TOYFLAG_USR|TOYFLAG_BIN))
USE_WHOAMI(OLDTOY(whoami, logname, TOYFLAG_USR|TOYFLAG_BIN))
diff --git a/android/linux/generated/flags.h b/android/linux/generated/flags.h
index 41a32992..21ce7dfe 100644
--- a/android/linux/generated/flags.h
+++ b/android/linux/generated/flags.h
@@ -76,9 +76,9 @@
#undef FLAG_d
#endif
-// basename <1as: <1as:
+// basename ^<1as: ^<1as:
#undef OPTSTR_basename
-#define OPTSTR_basename "<1as:"
+#define OPTSTR_basename "^<1as:"
#ifdef CLEANUP_basename
#undef CLEANUP_basename
#undef FOR_basename
@@ -1106,9 +1106,9 @@
#undef FLAG_c
#endif
-// gzip cdfk123456789[-123456789]
+// gzip ncdfk123456789[-123456789]
#undef OPTSTR_gzip
-#define OPTSTR_gzip "cdfk123456789[-123456789]"
+#define OPTSTR_gzip "ncdfk123456789[-123456789]"
#ifdef CLEANUP_gzip
#undef CLEANUP_gzip
#undef FOR_gzip
@@ -1125,6 +1125,7 @@
#undef FLAG_f
#undef FLAG_d
#undef FLAG_c
+#undef FLAG_n
#endif
// head ?n(lines)#<0=10c(bytes)#<0qv[-nc] ?n(lines)#<0=10c(bytes)#<0qv[-nc]
@@ -1479,9 +1480,9 @@
#undef FOR_link
#endif
-// ln <1vnfs <1vnfs
+// ln <1t:Tvnfs <1t:Tvnfs
#undef OPTSTR_ln
-#define OPTSTR_ln "<1vnfs"
+#define OPTSTR_ln "<1t:Tvnfs"
#ifdef CLEANUP_ln
#undef CLEANUP_ln
#undef FOR_ln
@@ -1489,6 +1490,8 @@
#undef FLAG_f
#undef FLAG_n
#undef FLAG_v
+#undef FLAG_T
+#undef FLAG_t
#endif
// load_policy <1>1
@@ -1797,9 +1800,9 @@
#undef FLAG_L
#endif
-// mktemp >1uqd(directory)p(tmpdir):t >1uqd(directory)p(tmpdir):t
+// mktemp >1(tmpdir);:uqd(directory)p:t >1(tmpdir);:uqd(directory)p:t
#undef OPTSTR_mktemp
-#define OPTSTR_mktemp ">1uqd(directory)p(tmpdir):t"
+#define OPTSTR_mktemp ">1(tmpdir);:uqd(directory)p:t"
#ifdef CLEANUP_mktemp
#undef CLEANUP_mktemp
#undef FOR_mktemp
@@ -1808,6 +1811,7 @@
#undef FLAG_d
#undef FLAG_q
#undef FLAG_u
+#undef FLAG_tmpdir
#endif
// modinfo <1b:k:F:0
@@ -2257,9 +2261,9 @@
#undef FOR_readahead
#endif
-// readlink <1>1nqmef(canonicalize)[-mef] <1>1nqmef(canonicalize)[-mef]
+// readlink <1nqmef(canonicalize)[-mef] <1nqmef(canonicalize)[-mef]
#undef OPTSTR_readlink
-#define OPTSTR_readlink "<1>1nqmef(canonicalize)[-mef]"
+#define OPTSTR_readlink "<1nqmef(canonicalize)[-mef]"
#ifdef CLEANUP_readlink
#undef CLEANUP_readlink
#undef FOR_readlink
@@ -2351,13 +2355,14 @@
#undef FLAG_f
#endif
-// rmdir <1p <1p
+// rmdir <1(ignore-fail-on-non-empty)p <1(ignore-fail-on-non-empty)p
#undef OPTSTR_rmdir
-#define OPTSTR_rmdir "<1p"
+#define OPTSTR_rmdir "<1(ignore-fail-on-non-empty)p"
#ifdef CLEANUP_rmdir
#undef CLEANUP_rmdir
#undef FOR_rmdir
#undef FLAG_p
+#undef FLAG_ignore_fail_on_non_empty
#endif
// rmmod <1wf
@@ -3251,13 +3256,14 @@
#undef FLAG_m
#endif
-// wget f:
+// wget (no-check-certificate)O:
#undef OPTSTR_wget
-#define OPTSTR_wget "f:"
+#define OPTSTR_wget "(no-check-certificate)O:"
#ifdef CLEANUP_wget
#undef CLEANUP_wget
#undef FOR_wget
-#undef FLAG_f
+#undef FLAG_O
+#undef FLAG_no_check_certificate
#endif
// which <1a <1a
@@ -4294,6 +4300,7 @@
#define FLAG_f (FORCED_FLAG<<10)
#define FLAG_d (FORCED_FLAG<<11)
#define FLAG_c (FORCED_FLAG<<12)
+#define FLAG_n (FORCED_FLAG<<13)
#endif
#ifdef FOR_head
@@ -4594,6 +4601,8 @@
#define FLAG_f (1<<1)
#define FLAG_n (1<<2)
#define FLAG_v (1<<3)
+#define FLAG_T (1<<4)
+#define FLAG_t (1<<5)
#endif
#ifdef FOR_load_policy
@@ -4859,6 +4868,7 @@
#define FLAG_d (1<<2)
#define FLAG_q (1<<3)
#define FLAG_u (1<<4)
+#define FLAG_tmpdir (1<<5)
#endif
#ifdef FOR_modinfo
@@ -5323,6 +5333,7 @@
#define TT this.rmdir
#endif
#define FLAG_p (1<<0)
+#define FLAG_ignore_fail_on_non_empty (1<<1)
#endif
#ifdef FOR_rmmod
@@ -6078,7 +6089,8 @@
#ifndef TT
#define TT this.wget
#endif
-#define FLAG_f (FORCED_FLAG<<0)
+#define FLAG_O (FORCED_FLAG<<0)
+#define FLAG_no_check_certificate (FORCED_FLAG<<1)
#endif
#ifdef FOR_which
diff --git a/android/linux/generated/globals.h b/android/linux/generated/globals.h
index 204e3448..dfa399ca 100644
--- a/android/linux/generated/globals.h
+++ b/android/linux/generated/globals.h
@@ -92,7 +92,7 @@ struct mknod_data {
// toys/lsb/mktemp.c
struct mktemp_data {
- char *p;
+ char *p, *tmpdir;
};
// toys/lsb/mount.c
@@ -421,7 +421,6 @@ struct timeout_data {
pid_t pid;
struct timeval ktv;
struct itimerval itv;
- int signaled;
};
// toys/other/truncate.c
@@ -960,6 +959,9 @@ struct useradd_data {
struct vi_data {
int cur_col;
int cur_row;
+ int scr_row;
+ int drawn_row;
+ int drawn_col;
unsigned screen_height;
unsigned screen_width;
int vi_mode;
@@ -970,6 +972,7 @@ struct vi_data {
char vi_reg;
char *last_search;
int tabstop;
+ int list;
};
// toys/pending/wget.c
@@ -1153,6 +1156,12 @@ struct kill_data {
struct arg_list *o;
};
+// toys/posix/ln.c
+
+struct ln_data {
+ char *t;
+};
+
// toys/posix/logger.c
struct logger_data {
@@ -1539,6 +1548,7 @@ extern union global_union {
struct iconv_data iconv;
struct id_data id;
struct kill_data kill;
+ struct ln_data ln;
struct logger_data logger;
struct ls_data ls;
struct mkdir_data mkdir;
diff --git a/android/linux/generated/help.h b/android/linux/generated/help.h
index b5c4b067..5543eaa6 100644
--- a/android/linux/generated/help.h
+++ b/android/linux/generated/help.h
@@ -190,7 +190,7 @@
#define HELP_realpath "usage: realpath FILE...\n\nDisplay the canonical absolute pathname"
-#define HELP_readlink "usage: readlink FILE\n\nWith no options, show what symlink points to, return error if not symlink.\n\nOptions for producing canonical paths (all symlinks/./.. resolved):\n\n-e Canonical path to existing entry (fail if missing)\n-f Full path (fail if directory missing)\n-m Ignore missing entries, show where it would be\n-n No trailing newline\n-q Quiet (no output, just error code)"
+#define HELP_readlink "usage: readlink FILE...\n\nWith no options, show what symlink points to, return error if not symlink.\n\nOptions for producing canonical paths (all symlinks/./.. resolved):\n\n-e Canonical path to existing entry (fail if missing)\n-f Full path (fail if directory missing)\n-m Ignore missing entries, show where it would be\n-n No trailing newline\n-q Quiet (no output, just error code)"
#define HELP_readahead "usage: readahead FILE...\n\nPreload files into disk cache."
@@ -320,7 +320,7 @@
#define HELP_xzcat "usage: xzcat [filename...]\n\nDecompress listed files to stdout. Use stdin if no files listed."
-#define HELP_wget "usage: wget -f filename URL\n-f filename: specify the filename to be saved\nURL: HTTP uniform resource location and only HTTP, not HTTPS\n\nexamples:\n wget -f index.html http://www.example.com\n wget -f sample.jpg http://www.example.com:8080/sample.jpg"
+#define HELP_wget "usage: wget -O filename URL\n-O filename: specify output filename\nURL: uniform resource location, FTP/HTTP only, not HTTPS\n\nexamples:\n wget -O index.html http://www.example.com\n wget -O sample.jpg ftp://ftp.example.com:21/sample.jpg"
#define HELP_vi "usage: vi FILE\nVisual text editor. Predates the existence of standardized cursor keys,\nso the controls are weird and historical."
@@ -482,7 +482,7 @@
#define HELP_sed "usage: sed [-inrzE] [-e SCRIPT]...|SCRIPT [-f SCRIPT_FILE]... [FILE...]\n\nStream editor. Apply one or more editing SCRIPTs to each line of input\n(from FILE or stdin) producing output (by default to stdout).\n\n-e Add SCRIPT to list\n-f Add contents of SCRIPT_FILE to list\n-i Edit each file in place (-iEXT keeps backup file with extension EXT)\n-n No default output (use the p command to output matched lines)\n-r Use extended regular expression syntax\n-E POSIX alias for -r\n-s Treat input files separately (implied by -i)\n-z Use \\0 rather than \\n as the input line separator\n\nA SCRIPT is a series of one or more COMMANDs separated by newlines or\nsemicolons. All -e SCRIPTs are concatenated together as if separated\nby newlines, followed by all lines from -f SCRIPT_FILEs, in order.\nIf no -e or -f SCRIPTs are specified, the first argument is the SCRIPT.\n\nEach COMMAND may be preceded by an address which limits the command to\napply only to the specified line(s). Commands without an address apply to\nevery line. Addresses are of the form:\n\n [ADDRESS[,ADDRESS]][!]COMMAND\n\nThe ADDRESS may be a decimal line number (starting at 1), a /regular\nexpression/ within a pair of forward slashes, or the character \"$\" which\nmatches the last line of input. (In -s or -i mode this matches the last\nline of each file, otherwise just the last line of the last file.) A single\naddress matches one line, a pair of comma separated addresses match\neverything from the first address to the second address (inclusive). If\nboth addresses are regular expressions, more than one range of lines in\neach file can match. The second address can be +N to end N lines later.\n\nREGULAR EXPRESSIONS in sed are started and ended by the same character\n(traditionally / but anything except a backslash or a newline works).\nBackslashes may be used to escape the delimiter if it occurs in the\nregex, and for the usual printf escapes (\\abcefnrtv and octal, hex,\nand unicode). An empty regex repeats the previous one. ADDRESS regexes\n(above) require the first delimiter to be escaped with a backslash when\nit isn't a forward slash (to distinguish it from the COMMANDs below).\n\nSed mostly operates on individual lines one at a time. It reads each line,\nprocesses it, and either writes it to the output or discards it before\nreading the next line. Sed can remember one additional line in a separate\nbuffer (using the h, H, g, G, and x commands), and can read the next line\nof input early (using the n and N command), but other than that command\nscripts operate on individual lines of text.\n\nEach COMMAND starts with a single character. The following commands take\nno arguments:\n\n ! Run this command when the test _didn't_ match.\n\n { Start a new command block, continuing until a corresponding \"}\".\n Command blocks may nest. If the block has an address, commands within\n the block are only run for lines within the block's address range.\n\n } End command block (this command cannot have an address)\n\n d Delete this line and move on to the next one\n (ignores remaining COMMANDs)\n\n D Delete one line of input and restart command SCRIPT (same as \"d\"\n unless you've glued lines together with \"N\" or similar)\n\n g Get remembered line (overwriting current line)\n\n G Get remembered line (appending to current line)\n\n h Remember this line (overwriting remembered line)\n\n H Remember this line (appending to remembered line, if any)\n\n l Print line, escaping \\abfrtv (but not newline), octal escaping other\n nonprintable characters, wrapping lines to terminal width with a\n backslash, and appending $ to actual end of line.\n\n n Print default output and read next line, replacing current line\n (If no next line available, quit processing script)\n\n N Append next line of input to this line, separated by a newline\n (This advances the line counter for address matching and \"=\", if no\n next line available quit processing script without default output)\n\n p Print this line\n\n P Print this line up to first newline (from \"N\")\n\n q Quit (print default output, no more commands processed or lines read)\n\n x Exchange this line with remembered line (overwrite in both directions)\n\n = Print the current line number (followed by a newline)\n\nThe following commands (may) take an argument. The \"text\" arguments (to\nthe \"a\", \"b\", and \"c\" commands) may end with an unescaped \"\\\" to append\nthe next line (for which leading whitespace is not skipped), and also\ntreat \";\" as a literal character (use \"\\;\" instead).\n\n a [text] Append text to output before attempting to read next line\n\n b [label] Branch, jumps to :label (or with no label, to end of SCRIPT)\n\n c [text] Delete line, output text at end of matching address range\n (ignores remaining COMMANDs)\n\n i [text] Print text\n\n r [file] Append contents of file to output before attempting to read\n next line.\n\n s/S/R/F Search for regex S, replace matched text with R using flags F.\n The first character after the \"s\" (anything but newline or\n backslash) is the delimiter, escape with \\ to use normally.\n\n The replacement text may contain \"&\" to substitute the matched\n text (escape it with backslash for a literal &), or \\1 through\n \\9 to substitute a parenthetical subexpression in the regex.\n You can also use the normal backslash escapes such as \\n and\n a backslash at the end of the line appends the next line.\n\n The flags are:\n\n [0-9] A number, substitute only that occurrence of pattern\n g Global, substitute all occurrences of pattern\n i Ignore case when matching\n p Print the line if match was found and replaced\n w [file] Write (append) line to file if match replaced\n\n t [label] Test, jump to :label only if an \"s\" command found a match in\n this line since last test (replacing with same text counts)\n\n T [label] Test false, jump only if \"s\" hasn't found a match.\n\n w [file] Write (append) line to file\n\n y/old/new/ Change each character in 'old' to corresponding character\n in 'new' (with standard backslash escapes, delimiter can be\n any repeated character except \\ or \\n)\n\n : [label] Labeled target for jump commands\n\n # Comment, ignore rest of this line of SCRIPT\n\nDeviations from POSIX: allow extended regular expressions with -r,\nediting in place with -i, separate with -s, NUL-separated input with -z,\nprintf escapes in text, line continuations, semicolons after all commands,\n2-address anywhere an address is allowed, \"T\" command, multiline\ncontinuations for [abc], \\; to end [abc] argument before end of line."
-#define HELP_rmdir "usage: rmdir [-p] [dirname...]\n\nRemove one or more directories.\n\n-p Remove path"
+#define HELP_rmdir "usage: rmdir [-p] [dirname...]\n\nRemove one or more directories.\n\n-p Remove path\n--ignore-fail-on-non-empty Ignore failures caused by non-empty directories"
#define HELP_rm "usage: rm [-fiRrv] FILE...\n\nRemove each argument from the filesystem.\n\n-f Force: remove without confirmation, no error if it doesn't exist\n-i Interactive: prompt for confirmation\n-rR Recursive: remove directory contents\n-v Verbose"
@@ -526,7 +526,7 @@
#define HELP_logger "usage: logger [-s] [-t TAG] [-p [FACILITY.]PRIORITY] [message...]\n\nLog message (or stdin) to syslog.\n\n-s Also write message to stderr\n-t Use TAG instead of username to identify message source\n-p Specify PRIORITY with optional FACILITY. Default is \"user.notice\""
-#define HELP_ln "usage: ln [-sfnv] [FROM...] TO\n\nCreate a link between FROM and TO.\nWith only one argument, create link in current directory.\n\n-s Create a symbolic link\n-f Force the creation of the link, even if TO already exists\n-n Symlink at destination treated as file\n-v Verbose"
+#define HELP_ln "usage: ln [-sfnv] [-t DIR] [FROM...] TO\n\nCreate a link between FROM and TO.\nOne/two/many arguments work like \"mv\" or \"cp\".\n\n-s Create a symbolic link\n-f Force the creation of the link, even if TO already exists\n-n Symlink at TO treated as file\n-t Create links in DIR\n-T TO always treated as file, max 2 arguments\n-v Verbose"
#define HELP_link "usage: link FILE NEWLINK\n\nCreate hardlink to a file."
@@ -552,9 +552,9 @@
#define HELP_getconf "usage: getconf -a [PATH] | -l | NAME [PATH]\n\nGet system configuration values. Values from pathconf(3) require a path.\n\n-a Show all (defaults to \"/\" if no path given)\n-l List available value names (grouped by source)"
-#define HELP_find "usage: find [-HL] [DIR...] [<options>]\n\nSearch directories for matching files.\nDefault: search \".\", match all, -print matches.\n\n-H Follow command line symlinks -L Follow all symlinks\n\nMatch filters:\n-name PATTERN filename with wildcards (-iname case insensitive)\n-path PATTERN path name with wildcards (-ipath case insensitive)\n-user UNAME belongs to user UNAME -nouser user ID not known\n-group GROUP belongs to group GROUP -nogroup group ID not known\n-perm [-/]MODE permissions (-=min /=any) -prune ignore dir contents\n-size N[c] 512 byte blocks (c=bytes) -xdev only this filesystem\n-links N hardlink count -atime N[u] accessed N units ago\n-ctime N[u] created N units ago -mtime N[u] modified N units ago\n-newer FILE newer mtime than FILE -mindepth N at least N dirs down\n-depth ignore contents of dir -maxdepth N at most N dirs down\n-inum N inode number N -empty empty files and dirs\n-type [bcdflps] type is (block, char, dir, file, symlink, pipe, socket)\n-true always true -false always false\n-context PATTERN security context\n\nNumbers N may be prefixed by a - (less than) or + (greater than). Units for\n-Xtime are d (days, default), h (hours), m (minutes), or s (seconds).\n\nCombine matches with:\n!, -a, -o, ( ) not, and, or, group expressions\n\nActions:\n-print Print match with newline -print0 Print match with null\n-exec Run command with path -execdir Run command in file's dir\n-ok Ask before exec -okdir Ask before execdir\n-delete Remove matching file/dir -printf FORMAT Print using format string\n\nCommands substitute \"{}\" with matched file. End with \";\" to run each file,\nor \"+\" (next argument after \"{}\") to collect and run with multiple files.\n\n-printf FORMAT characters are \\ escapes and:\n%b 512 byte blocks used\n%f basename %g textual gid %G numeric gid\n%i decimal inode %l target of symlink %m octal mode\n%M ls format type/mode %p path to file %P path to file minus DIR\n%s size in bytes %T@ mod time as unixtime\n%u username %U numeric uid %Z security context"
+#define HELP_find "usage: find [-HL] [DIR...] [<options>]\n\nSearch directories for matching files.\nDefault: search \".\", match all, -print matches.\n\n-H Follow command line symlinks -L Follow all symlinks\n\nMatch filters:\n-name PATTERN filename with wildcards (-iname case insensitive)\n-path PATTERN path name with wildcards (-ipath case insensitive)\n-user UNAME belongs to user UNAME -nouser user ID not known\n-group GROUP belongs to group GROUP -nogroup group ID not known\n-perm [-/]MODE permissions (-=min /=any) -prune ignore dir contents\n-size N[c] 512 byte blocks (c=bytes) -xdev only this filesystem\n-links N hardlink count -atime N[u] accessed N units ago\n-ctime N[u] created N units ago -mtime N[u] modified N units ago\n-newer FILE newer mtime than FILE -mindepth N at least N dirs down\n-depth ignore contents of dir -maxdepth N at most N dirs down\n-inum N inode number N -empty empty files and dirs\n-type [bcdflps] type is (block, char, dir, file, symlink, pipe, socket)\n-true always true -false always false\n-context PATTERN security context\n-newerXY FILE X=acm time > FILE's Y=acm time (Y=t: FILE is literal time)\n\nNumbers N may be prefixed by a - (less than) or + (greater than). Units for\n-Xtime are d (days, default), h (hours), m (minutes), or s (seconds).\n\nCombine matches with:\n!, -a, -o, ( ) not, and, or, group expressions\n\nActions:\n-print Print match with newline -print0 Print match with null\n-exec Run command with path -execdir Run command in file's dir\n-ok Ask before exec -okdir Ask before execdir\n-delete Remove matching file/dir -printf FORMAT Print using format string\n\nCommands substitute \"{}\" with matched file. End with \";\" to run each file,\nor \"+\" (next argument after \"{}\") to collect and run with multiple files.\n\n-printf FORMAT characters are \\ escapes and:\n%b 512 byte blocks used\n%f basename %g textual gid %G numeric gid\n%i decimal inode %l target of symlink %m octal mode\n%M ls format type/mode %p path to file %P path to file minus DIR\n%s size in bytes %T@ mod time as unixtime\n%u username %U numeric uid %Z security context"
-#define HELP_file "usage: file [-bhL] [file...]\n\nExamine the given files and describe their content types.\n\n-b Brief (no filename)\n-h Don't follow symlinks (default)\n-L Follow symlinks\n-s show block/char device contents"
+#define HELP_file "usage: file [-bhLs] [file...]\n\nExamine the given files and describe their content types.\n\n-b Brief (no filename)\n-h Don't follow symlinks (default)\n-L Follow symlinks\n-s Show block/char device contents"
#define HELP_false "Return nonzero."
diff --git a/android/linux/generated/newtoys.h b/android/linux/generated/newtoys.h
index 12f9d164..0f6410a6 100644
--- a/android/linux/generated/newtoys.h
+++ b/android/linux/generated/newtoys.h
@@ -11,7 +11,7 @@ USE_ARP(NEWTOY(arp, "vi:nDsdap:A:H:[+Ap][!sd]", TOYFLAG_USR|TOYFLAG_BIN))
USE_ARPING(NEWTOY(arping, "<1>1s:I:w#<0c#<0AUDbqf[+AU][+Df]", TOYFLAG_USR|TOYFLAG_SBIN))
USE_ASCII(NEWTOY(ascii, 0, TOYFLAG_USR|TOYFLAG_BIN))
USE_BASE64(NEWTOY(base64, "diw#<0=76[!dw]", TOYFLAG_USR|TOYFLAG_BIN))
-USE_BASENAME(NEWTOY(basename, "<1as:", TOYFLAG_USR|TOYFLAG_BIN))
+USE_BASENAME(NEWTOY(basename, "^<1as:", TOYFLAG_USR|TOYFLAG_BIN))
USE_SH(OLDTOY(bash, sh, TOYFLAG_BIN))
USE_BC(NEWTOY(bc, "i(interactive)l(mathlib)q(quiet)s(standard)w(warn)", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
USE_BLKID(NEWTOY(blkid, "ULs*[!LU]", TOYFLAG_BIN))
@@ -97,7 +97,7 @@ USE_GROUPADD(NEWTOY(groupadd, "<1>2g#<0S", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
USE_GROUPDEL(NEWTOY(groupdel, "<1>2", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
USE_GROUPS(NEWTOY(groups, NULL, TOYFLAG_USR|TOYFLAG_BIN))
USE_GUNZIP(NEWTOY(gunzip, "cdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN))
-USE_GZIP(NEWTOY(gzip, "cdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_GZIP(NEWTOY(gzip, "ncdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN))
USE_REBOOT(OLDTOY(halt, reboot, TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
USE_HEAD(NEWTOY(head, "?n(lines)#<0=10c(bytes)#<0qv[-nc]", TOYFLAG_USR|TOYFLAG_BIN))
USE_HELLO(NEWTOY(hello, 0, TOYFLAG_USR|TOYFLAG_BIN))
@@ -135,7 +135,7 @@ USE_KILLALL5(NEWTOY(killall5, "?o*ls: [!lo][!ls]", TOYFLAG_SBIN))
USE_KLOGD(NEWTOY(klogd, "c#<1>8n", TOYFLAG_SBIN))
USE_LAST(NEWTOY(last, "f:W", TOYFLAG_BIN))
USE_LINK(NEWTOY(link, "<2>2", TOYFLAG_USR|TOYFLAG_BIN))
-USE_LN(NEWTOY(ln, "<1vnfs", TOYFLAG_BIN))
+USE_LN(NEWTOY(ln, "<1t:Tvnfs", TOYFLAG_BIN))
USE_LOAD_POLICY(NEWTOY(load_policy, "<1>1", TOYFLAG_USR|TOYFLAG_SBIN))
USE_LOG(NEWTOY(log, "<1p:t:", TOYFLAG_USR|TOYFLAG_SBIN))
USE_LOGGER(NEWTOY(logger, "st:p:", TOYFLAG_USR|TOYFLAG_BIN))
@@ -162,7 +162,7 @@ USE_MKFIFO(NEWTOY(mkfifo, "<1"USE_MKFIFO_Z("Z:")"m:", TOYFLAG_USR|TOYFLAG_BIN))
USE_MKNOD(NEWTOY(mknod, "<2>4m(mode):"USE_MKNOD_Z("Z:"), TOYFLAG_BIN|TOYFLAG_UMASK))
USE_MKPASSWD(NEWTOY(mkpasswd, ">2S:m:P#=0<0", TOYFLAG_USR|TOYFLAG_BIN))
USE_MKSWAP(NEWTOY(mkswap, "<1>1L:", TOYFLAG_SBIN))
-USE_MKTEMP(NEWTOY(mktemp, ">1uqd(directory)p(tmpdir):t", TOYFLAG_BIN))
+USE_MKTEMP(NEWTOY(mktemp, ">1(tmpdir);:uqd(directory)p:t", TOYFLAG_BIN))
USE_MODINFO(NEWTOY(modinfo, "<1b:k:F:0", TOYFLAG_SBIN))
USE_MODPROBE(NEWTOY(modprobe, "alrqvsDbd*", TOYFLAG_SBIN))
USE_MORE(NEWTOY(more, 0, TOYFLAG_USR|TOYFLAG_BIN))
@@ -201,7 +201,7 @@ USE_PS(NEWTOY(ps, "k(sort)*P(ppid)*aAdeflMno*O*p(pid)*s*t*Tu*U*g*G*wZ[!ol][+Ae][
USE_PWD(NEWTOY(pwd, ">0LP[-LP]", TOYFLAG_BIN))
USE_PWDX(NEWTOY(pwdx, "<1a", TOYFLAG_USR|TOYFLAG_BIN))
USE_READAHEAD(NEWTOY(readahead, NULL, TOYFLAG_BIN))
-USE_READLINK(NEWTOY(readlink, "<1>1nqmef(canonicalize)[-mef]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_READLINK(NEWTOY(readlink, "<1nqmef(canonicalize)[-mef]", TOYFLAG_USR|TOYFLAG_BIN))
USE_REALPATH(NEWTOY(realpath, "<1", TOYFLAG_USR|TOYFLAG_BIN))
USE_REBOOT(NEWTOY(reboot, "fn", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
USE_RENICE(NEWTOY(renice, "<1gpun#|", TOYFLAG_USR|TOYFLAG_BIN))
@@ -210,7 +210,7 @@ USE_RESTORECON(NEWTOY(restorecon, "<1DFnRrv", TOYFLAG_USR|TOYFLAG_SBIN))
USE_REV(NEWTOY(rev, NULL, TOYFLAG_USR|TOYFLAG_BIN))
USE_RFKILL(NEWTOY(rfkill, "<1>2", TOYFLAG_USR|TOYFLAG_SBIN))
USE_RM(NEWTOY(rm, "fiRrv[-fi]", TOYFLAG_BIN))
-USE_RMDIR(NEWTOY(rmdir, "<1p", TOYFLAG_BIN))
+USE_RMDIR(NEWTOY(rmdir, "<1(ignore-fail-on-non-empty)p", TOYFLAG_BIN))
USE_RMMOD(NEWTOY(rmmod, "<1wf", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
USE_ROUTE(NEWTOY(route, "?neA:", TOYFLAG_BIN))
USE_RUNCON(NEWTOY(runcon, "<2", TOYFLAG_USR|TOYFLAG_SBIN))
@@ -288,7 +288,7 @@ USE_VMSTAT(NEWTOY(vmstat, ">2n", TOYFLAG_BIN))
USE_W(NEWTOY(w, NULL, TOYFLAG_USR|TOYFLAG_BIN))
USE_WATCH(NEWTOY(watch, "^<1n%<100=2000tebx", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
USE_WC(NEWTOY(wc, "mcwl", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
-USE_WGET(NEWTOY(wget, "f:", TOYFLAG_USR|TOYFLAG_BIN))
+USE_WGET(NEWTOY(wget, "(no-check-certificate)O:", TOYFLAG_USR|TOYFLAG_BIN))
USE_WHICH(NEWTOY(which, "<1a", TOYFLAG_USR|TOYFLAG_BIN))
USE_WHO(NEWTOY(who, "a", TOYFLAG_USR|TOYFLAG_BIN))
USE_WHOAMI(OLDTOY(whoami, logname, TOYFLAG_USR|TOYFLAG_BIN))
diff --git a/android/mac/generated/flags.h b/android/mac/generated/flags.h
index 54863e81..a982a8d1 100644
--- a/android/mac/generated/flags.h
+++ b/android/mac/generated/flags.h
@@ -76,9 +76,9 @@
#undef FLAG_d
#endif
-// basename <1as: <1as:
+// basename ^<1as: ^<1as:
#undef OPTSTR_basename
-#define OPTSTR_basename "<1as:"
+#define OPTSTR_basename "^<1as:"
#ifdef CLEANUP_basename
#undef CLEANUP_basename
#undef FOR_basename
@@ -1106,9 +1106,9 @@
#undef FLAG_c
#endif
-// gzip cdfk123456789[-123456789]
+// gzip ncdfk123456789[-123456789]
#undef OPTSTR_gzip
-#define OPTSTR_gzip "cdfk123456789[-123456789]"
+#define OPTSTR_gzip "ncdfk123456789[-123456789]"
#ifdef CLEANUP_gzip
#undef CLEANUP_gzip
#undef FOR_gzip
@@ -1125,6 +1125,7 @@
#undef FLAG_f
#undef FLAG_d
#undef FLAG_c
+#undef FLAG_n
#endif
// head ?n(lines)#<0=10c(bytes)#<0qv[-nc] ?n(lines)#<0=10c(bytes)#<0qv[-nc]
@@ -1479,9 +1480,9 @@
#undef FOR_link
#endif
-// ln <1vnfs <1vnfs
+// ln <1t:Tvnfs <1t:Tvnfs
#undef OPTSTR_ln
-#define OPTSTR_ln "<1vnfs"
+#define OPTSTR_ln "<1t:Tvnfs"
#ifdef CLEANUP_ln
#undef CLEANUP_ln
#undef FOR_ln
@@ -1489,6 +1490,8 @@
#undef FLAG_f
#undef FLAG_n
#undef FLAG_v
+#undef FLAG_T
+#undef FLAG_t
#endif
// load_policy <1>1
@@ -1797,9 +1800,9 @@
#undef FLAG_L
#endif
-// mktemp >1uqd(directory)p(tmpdir):t >1uqd(directory)p(tmpdir):t
+// mktemp >1(tmpdir);:uqd(directory)p:t >1(tmpdir);:uqd(directory)p:t
#undef OPTSTR_mktemp
-#define OPTSTR_mktemp ">1uqd(directory)p(tmpdir):t"
+#define OPTSTR_mktemp ">1(tmpdir);:uqd(directory)p:t"
#ifdef CLEANUP_mktemp
#undef CLEANUP_mktemp
#undef FOR_mktemp
@@ -1808,6 +1811,7 @@
#undef FLAG_d
#undef FLAG_q
#undef FLAG_u
+#undef FLAG_tmpdir
#endif
// modinfo <1b:k:F:0
@@ -2257,9 +2261,9 @@
#undef FOR_readahead
#endif
-// readlink <1>1nqmef(canonicalize)[-mef] <1>1nqmef(canonicalize)[-mef]
+// readlink <1nqmef(canonicalize)[-mef] <1nqmef(canonicalize)[-mef]
#undef OPTSTR_readlink
-#define OPTSTR_readlink "<1>1nqmef(canonicalize)[-mef]"
+#define OPTSTR_readlink "<1nqmef(canonicalize)[-mef]"
#ifdef CLEANUP_readlink
#undef CLEANUP_readlink
#undef FOR_readlink
@@ -2351,13 +2355,14 @@
#undef FLAG_f
#endif
-// rmdir <1p <1p
+// rmdir <1(ignore-fail-on-non-empty)p <1(ignore-fail-on-non-empty)p
#undef OPTSTR_rmdir
-#define OPTSTR_rmdir "<1p"
+#define OPTSTR_rmdir "<1(ignore-fail-on-non-empty)p"
#ifdef CLEANUP_rmdir
#undef CLEANUP_rmdir
#undef FOR_rmdir
#undef FLAG_p
+#undef FLAG_ignore_fail_on_non_empty
#endif
// rmmod <1wf
@@ -3251,13 +3256,14 @@
#undef FLAG_m
#endif
-// wget f:
+// wget (no-check-certificate)O:
#undef OPTSTR_wget
-#define OPTSTR_wget "f:"
+#define OPTSTR_wget "(no-check-certificate)O:"
#ifdef CLEANUP_wget
#undef CLEANUP_wget
#undef FOR_wget
-#undef FLAG_f
+#undef FLAG_O
+#undef FLAG_no_check_certificate
#endif
// which <1a <1a
@@ -4294,6 +4300,7 @@
#define FLAG_f (FORCED_FLAG<<10)
#define FLAG_d (FORCED_FLAG<<11)
#define FLAG_c (FORCED_FLAG<<12)
+#define FLAG_n (FORCED_FLAG<<13)
#endif
#ifdef FOR_head
@@ -4594,6 +4601,8 @@
#define FLAG_f (1<<1)
#define FLAG_n (1<<2)
#define FLAG_v (1<<3)
+#define FLAG_T (1<<4)
+#define FLAG_t (1<<5)
#endif
#ifdef FOR_load_policy
@@ -4859,6 +4868,7 @@
#define FLAG_d (1<<2)
#define FLAG_q (1<<3)
#define FLAG_u (1<<4)
+#define FLAG_tmpdir (1<<5)
#endif
#ifdef FOR_modinfo
@@ -5323,6 +5333,7 @@
#define TT this.rmdir
#endif
#define FLAG_p (1<<0)
+#define FLAG_ignore_fail_on_non_empty (1<<1)
#endif
#ifdef FOR_rmmod
@@ -6078,7 +6089,8 @@
#ifndef TT
#define TT this.wget
#endif
-#define FLAG_f (FORCED_FLAG<<0)
+#define FLAG_O (FORCED_FLAG<<0)
+#define FLAG_no_check_certificate (FORCED_FLAG<<1)
#endif
#ifdef FOR_which
diff --git a/android/mac/generated/globals.h b/android/mac/generated/globals.h
index 204e3448..dfa399ca 100644
--- a/android/mac/generated/globals.h
+++ b/android/mac/generated/globals.h
@@ -92,7 +92,7 @@ struct mknod_data {
// toys/lsb/mktemp.c
struct mktemp_data {
- char *p;
+ char *p, *tmpdir;
};
// toys/lsb/mount.c
@@ -421,7 +421,6 @@ struct timeout_data {
pid_t pid;
struct timeval ktv;
struct itimerval itv;
- int signaled;
};
// toys/other/truncate.c
@@ -960,6 +959,9 @@ struct useradd_data {
struct vi_data {
int cur_col;
int cur_row;
+ int scr_row;
+ int drawn_row;
+ int drawn_col;
unsigned screen_height;
unsigned screen_width;
int vi_mode;
@@ -970,6 +972,7 @@ struct vi_data {
char vi_reg;
char *last_search;
int tabstop;
+ int list;
};
// toys/pending/wget.c
@@ -1153,6 +1156,12 @@ struct kill_data {
struct arg_list *o;
};
+// toys/posix/ln.c
+
+struct ln_data {
+ char *t;
+};
+
// toys/posix/logger.c
struct logger_data {
@@ -1539,6 +1548,7 @@ extern union global_union {
struct iconv_data iconv;
struct id_data id;
struct kill_data kill;
+ struct ln_data ln;
struct logger_data logger;
struct ls_data ls;
struct mkdir_data mkdir;
diff --git a/android/mac/generated/help.h b/android/mac/generated/help.h
index b5c4b067..5543eaa6 100644
--- a/android/mac/generated/help.h
+++ b/android/mac/generated/help.h
@@ -190,7 +190,7 @@
#define HELP_realpath "usage: realpath FILE...\n\nDisplay the canonical absolute pathname"
-#define HELP_readlink "usage: readlink FILE\n\nWith no options, show what symlink points to, return error if not symlink.\n\nOptions for producing canonical paths (all symlinks/./.. resolved):\n\n-e Canonical path to existing entry (fail if missing)\n-f Full path (fail if directory missing)\n-m Ignore missing entries, show where it would be\n-n No trailing newline\n-q Quiet (no output, just error code)"
+#define HELP_readlink "usage: readlink FILE...\n\nWith no options, show what symlink points to, return error if not symlink.\n\nOptions for producing canonical paths (all symlinks/./.. resolved):\n\n-e Canonical path to existing entry (fail if missing)\n-f Full path (fail if directory missing)\n-m Ignore missing entries, show where it would be\n-n No trailing newline\n-q Quiet (no output, just error code)"
#define HELP_readahead "usage: readahead FILE...\n\nPreload files into disk cache."
@@ -320,7 +320,7 @@
#define HELP_xzcat "usage: xzcat [filename...]\n\nDecompress listed files to stdout. Use stdin if no files listed."
-#define HELP_wget "usage: wget -f filename URL\n-f filename: specify the filename to be saved\nURL: HTTP uniform resource location and only HTTP, not HTTPS\n\nexamples:\n wget -f index.html http://www.example.com\n wget -f sample.jpg http://www.example.com:8080/sample.jpg"
+#define HELP_wget "usage: wget -O filename URL\n-O filename: specify output filename\nURL: uniform resource location, FTP/HTTP only, not HTTPS\n\nexamples:\n wget -O index.html http://www.example.com\n wget -O sample.jpg ftp://ftp.example.com:21/sample.jpg"
#define HELP_vi "usage: vi FILE\nVisual text editor. Predates the existence of standardized cursor keys,\nso the controls are weird and historical."
@@ -482,7 +482,7 @@
#define HELP_sed "usage: sed [-inrzE] [-e SCRIPT]...|SCRIPT [-f SCRIPT_FILE]... [FILE...]\n\nStream editor. Apply one or more editing SCRIPTs to each line of input\n(from FILE or stdin) producing output (by default to stdout).\n\n-e Add SCRIPT to list\n-f Add contents of SCRIPT_FILE to list\n-i Edit each file in place (-iEXT keeps backup file with extension EXT)\n-n No default output (use the p command to output matched lines)\n-r Use extended regular expression syntax\n-E POSIX alias for -r\n-s Treat input files separately (implied by -i)\n-z Use \\0 rather than \\n as the input line separator\n\nA SCRIPT is a series of one or more COMMANDs separated by newlines or\nsemicolons. All -e SCRIPTs are concatenated together as if separated\nby newlines, followed by all lines from -f SCRIPT_FILEs, in order.\nIf no -e or -f SCRIPTs are specified, the first argument is the SCRIPT.\n\nEach COMMAND may be preceded by an address which limits the command to\napply only to the specified line(s). Commands without an address apply to\nevery line. Addresses are of the form:\n\n [ADDRESS[,ADDRESS]][!]COMMAND\n\nThe ADDRESS may be a decimal line number (starting at 1), a /regular\nexpression/ within a pair of forward slashes, or the character \"$\" which\nmatches the last line of input. (In -s or -i mode this matches the last\nline of each file, otherwise just the last line of the last file.) A single\naddress matches one line, a pair of comma separated addresses match\neverything from the first address to the second address (inclusive). If\nboth addresses are regular expressions, more than one range of lines in\neach file can match. The second address can be +N to end N lines later.\n\nREGULAR EXPRESSIONS in sed are started and ended by the same character\n(traditionally / but anything except a backslash or a newline works).\nBackslashes may be used to escape the delimiter if it occurs in the\nregex, and for the usual printf escapes (\\abcefnrtv and octal, hex,\nand unicode). An empty regex repeats the previous one. ADDRESS regexes\n(above) require the first delimiter to be escaped with a backslash when\nit isn't a forward slash (to distinguish it from the COMMANDs below).\n\nSed mostly operates on individual lines one at a time. It reads each line,\nprocesses it, and either writes it to the output or discards it before\nreading the next line. Sed can remember one additional line in a separate\nbuffer (using the h, H, g, G, and x commands), and can read the next line\nof input early (using the n and N command), but other than that command\nscripts operate on individual lines of text.\n\nEach COMMAND starts with a single character. The following commands take\nno arguments:\n\n ! Run this command when the test _didn't_ match.\n\n { Start a new command block, continuing until a corresponding \"}\".\n Command blocks may nest. If the block has an address, commands within\n the block are only run for lines within the block's address range.\n\n } End command block (this command cannot have an address)\n\n d Delete this line and move on to the next one\n (ignores remaining COMMANDs)\n\n D Delete one line of input and restart command SCRIPT (same as \"d\"\n unless you've glued lines together with \"N\" or similar)\n\n g Get remembered line (overwriting current line)\n\n G Get remembered line (appending to current line)\n\n h Remember this line (overwriting remembered line)\n\n H Remember this line (appending to remembered line, if any)\n\n l Print line, escaping \\abfrtv (but not newline), octal escaping other\n nonprintable characters, wrapping lines to terminal width with a\n backslash, and appending $ to actual end of line.\n\n n Print default output and read next line, replacing current line\n (If no next line available, quit processing script)\n\n N Append next line of input to this line, separated by a newline\n (This advances the line counter for address matching and \"=\", if no\n next line available quit processing script without default output)\n\n p Print this line\n\n P Print this line up to first newline (from \"N\")\n\n q Quit (print default output, no more commands processed or lines read)\n\n x Exchange this line with remembered line (overwrite in both directions)\n\n = Print the current line number (followed by a newline)\n\nThe following commands (may) take an argument. The \"text\" arguments (to\nthe \"a\", \"b\", and \"c\" commands) may end with an unescaped \"\\\" to append\nthe next line (for which leading whitespace is not skipped), and also\ntreat \";\" as a literal character (use \"\\;\" instead).\n\n a [text] Append text to output before attempting to read next line\n\n b [label] Branch, jumps to :label (or with no label, to end of SCRIPT)\n\n c [text] Delete line, output text at end of matching address range\n (ignores remaining COMMANDs)\n\n i [text] Print text\n\n r [file] Append contents of file to output before attempting to read\n next line.\n\n s/S/R/F Search for regex S, replace matched text with R using flags F.\n The first character after the \"s\" (anything but newline or\n backslash) is the delimiter, escape with \\ to use normally.\n\n The replacement text may contain \"&\" to substitute the matched\n text (escape it with backslash for a literal &), or \\1 through\n \\9 to substitute a parenthetical subexpression in the regex.\n You can also use the normal backslash escapes such as \\n and\n a backslash at the end of the line appends the next line.\n\n The flags are:\n\n [0-9] A number, substitute only that occurrence of pattern\n g Global, substitute all occurrences of pattern\n i Ignore case when matching\n p Print the line if match was found and replaced\n w [file] Write (append) line to file if match replaced\n\n t [label] Test, jump to :label only if an \"s\" command found a match in\n this line since last test (replacing with same text counts)\n\n T [label] Test false, jump only if \"s\" hasn't found a match.\n\n w [file] Write (append) line to file\n\n y/old/new/ Change each character in 'old' to corresponding character\n in 'new' (with standard backslash escapes, delimiter can be\n any repeated character except \\ or \\n)\n\n : [label] Labeled target for jump commands\n\n # Comment, ignore rest of this line of SCRIPT\n\nDeviations from POSIX: allow extended regular expressions with -r,\nediting in place with -i, separate with -s, NUL-separated input with -z,\nprintf escapes in text, line continuations, semicolons after all commands,\n2-address anywhere an address is allowed, \"T\" command, multiline\ncontinuations for [abc], \\; to end [abc] argument before end of line."
-#define HELP_rmdir "usage: rmdir [-p] [dirname...]\n\nRemove one or more directories.\n\n-p Remove path"
+#define HELP_rmdir "usage: rmdir [-p] [dirname...]\n\nRemove one or more directories.\n\n-p Remove path\n--ignore-fail-on-non-empty Ignore failures caused by non-empty directories"
#define HELP_rm "usage: rm [-fiRrv] FILE...\n\nRemove each argument from the filesystem.\n\n-f Force: remove without confirmation, no error if it doesn't exist\n-i Interactive: prompt for confirmation\n-rR Recursive: remove directory contents\n-v Verbose"
@@ -526,7 +526,7 @@
#define HELP_logger "usage: logger [-s] [-t TAG] [-p [FACILITY.]PRIORITY] [message...]\n\nLog message (or stdin) to syslog.\n\n-s Also write message to stderr\n-t Use TAG instead of username to identify message source\n-p Specify PRIORITY with optional FACILITY. Default is \"user.notice\""
-#define HELP_ln "usage: ln [-sfnv] [FROM...] TO\n\nCreate a link between FROM and TO.\nWith only one argument, create link in current directory.\n\n-s Create a symbolic link\n-f Force the creation of the link, even if TO already exists\n-n Symlink at destination treated as file\n-v Verbose"
+#define HELP_ln "usage: ln [-sfnv] [-t DIR] [FROM...] TO\n\nCreate a link between FROM and TO.\nOne/two/many arguments work like \"mv\" or \"cp\".\n\n-s Create a symbolic link\n-f Force the creation of the link, even if TO already exists\n-n Symlink at TO treated as file\n-t Create links in DIR\n-T TO always treated as file, max 2 arguments\n-v Verbose"
#define HELP_link "usage: link FILE NEWLINK\n\nCreate hardlink to a file."
@@ -552,9 +552,9 @@
#define HELP_getconf "usage: getconf -a [PATH] | -l | NAME [PATH]\n\nGet system configuration values. Values from pathconf(3) require a path.\n\n-a Show all (defaults to \"/\" if no path given)\n-l List available value names (grouped by source)"
-#define HELP_find "usage: find [-HL] [DIR...] [<options>]\n\nSearch directories for matching files.\nDefault: search \".\", match all, -print matches.\n\n-H Follow command line symlinks -L Follow all symlinks\n\nMatch filters:\n-name PATTERN filename with wildcards (-iname case insensitive)\n-path PATTERN path name with wildcards (-ipath case insensitive)\n-user UNAME belongs to user UNAME -nouser user ID not known\n-group GROUP belongs to group GROUP -nogroup group ID not known\n-perm [-/]MODE permissions (-=min /=any) -prune ignore dir contents\n-size N[c] 512 byte blocks (c=bytes) -xdev only this filesystem\n-links N hardlink count -atime N[u] accessed N units ago\n-ctime N[u] created N units ago -mtime N[u] modified N units ago\n-newer FILE newer mtime than FILE -mindepth N at least N dirs down\n-depth ignore contents of dir -maxdepth N at most N dirs down\n-inum N inode number N -empty empty files and dirs\n-type [bcdflps] type is (block, char, dir, file, symlink, pipe, socket)\n-true always true -false always false\n-context PATTERN security context\n\nNumbers N may be prefixed by a - (less than) or + (greater than). Units for\n-Xtime are d (days, default), h (hours), m (minutes), or s (seconds).\n\nCombine matches with:\n!, -a, -o, ( ) not, and, or, group expressions\n\nActions:\n-print Print match with newline -print0 Print match with null\n-exec Run command with path -execdir Run command in file's dir\n-ok Ask before exec -okdir Ask before execdir\n-delete Remove matching file/dir -printf FORMAT Print using format string\n\nCommands substitute \"{}\" with matched file. End with \";\" to run each file,\nor \"+\" (next argument after \"{}\") to collect and run with multiple files.\n\n-printf FORMAT characters are \\ escapes and:\n%b 512 byte blocks used\n%f basename %g textual gid %G numeric gid\n%i decimal inode %l target of symlink %m octal mode\n%M ls format type/mode %p path to file %P path to file minus DIR\n%s size in bytes %T@ mod time as unixtime\n%u username %U numeric uid %Z security context"
+#define HELP_find "usage: find [-HL] [DIR...] [<options>]\n\nSearch directories for matching files.\nDefault: search \".\", match all, -print matches.\n\n-H Follow command line symlinks -L Follow all symlinks\n\nMatch filters:\n-name PATTERN filename with wildcards (-iname case insensitive)\n-path PATTERN path name with wildcards (-ipath case insensitive)\n-user UNAME belongs to user UNAME -nouser user ID not known\n-group GROUP belongs to group GROUP -nogroup group ID not known\n-perm [-/]MODE permissions (-=min /=any) -prune ignore dir contents\n-size N[c] 512 byte blocks (c=bytes) -xdev only this filesystem\n-links N hardlink count -atime N[u] accessed N units ago\n-ctime N[u] created N units ago -mtime N[u] modified N units ago\n-newer FILE newer mtime than FILE -mindepth N at least N dirs down\n-depth ignore contents of dir -maxdepth N at most N dirs down\n-inum N inode number N -empty empty files and dirs\n-type [bcdflps] type is (block, char, dir, file, symlink, pipe, socket)\n-true always true -false always false\n-context PATTERN security context\n-newerXY FILE X=acm time > FILE's Y=acm time (Y=t: FILE is literal time)\n\nNumbers N may be prefixed by a - (less than) or + (greater than). Units for\n-Xtime are d (days, default), h (hours), m (minutes), or s (seconds).\n\nCombine matches with:\n!, -a, -o, ( ) not, and, or, group expressions\n\nActions:\n-print Print match with newline -print0 Print match with null\n-exec Run command with path -execdir Run command in file's dir\n-ok Ask before exec -okdir Ask before execdir\n-delete Remove matching file/dir -printf FORMAT Print using format string\n\nCommands substitute \"{}\" with matched file. End with \";\" to run each file,\nor \"+\" (next argument after \"{}\") to collect and run with multiple files.\n\n-printf FORMAT characters are \\ escapes and:\n%b 512 byte blocks used\n%f basename %g textual gid %G numeric gid\n%i decimal inode %l target of symlink %m octal mode\n%M ls format type/mode %p path to file %P path to file minus DIR\n%s size in bytes %T@ mod time as unixtime\n%u username %U numeric uid %Z security context"
-#define HELP_file "usage: file [-bhL] [file...]\n\nExamine the given files and describe their content types.\n\n-b Brief (no filename)\n-h Don't follow symlinks (default)\n-L Follow symlinks\n-s show block/char device contents"
+#define HELP_file "usage: file [-bhLs] [file...]\n\nExamine the given files and describe their content types.\n\n-b Brief (no filename)\n-h Don't follow symlinks (default)\n-L Follow symlinks\n-s Show block/char device contents"
#define HELP_false "Return nonzero."
diff --git a/android/mac/generated/newtoys.h b/android/mac/generated/newtoys.h
index 12f9d164..0f6410a6 100644
--- a/android/mac/generated/newtoys.h
+++ b/android/mac/generated/newtoys.h
@@ -11,7 +11,7 @@ USE_ARP(NEWTOY(arp, "vi:nDsdap:A:H:[+Ap][!sd]", TOYFLAG_USR|TOYFLAG_BIN))
USE_ARPING(NEWTOY(arping, "<1>1s:I:w#<0c#<0AUDbqf[+AU][+Df]", TOYFLAG_USR|TOYFLAG_SBIN))
USE_ASCII(NEWTOY(ascii, 0, TOYFLAG_USR|TOYFLAG_BIN))
USE_BASE64(NEWTOY(base64, "diw#<0=76[!dw]", TOYFLAG_USR|TOYFLAG_BIN))
-USE_BASENAME(NEWTOY(basename, "<1as:", TOYFLAG_USR|TOYFLAG_BIN))
+USE_BASENAME(NEWTOY(basename, "^<1as:", TOYFLAG_USR|TOYFLAG_BIN))
USE_SH(OLDTOY(bash, sh, TOYFLAG_BIN))
USE_BC(NEWTOY(bc, "i(interactive)l(mathlib)q(quiet)s(standard)w(warn)", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
USE_BLKID(NEWTOY(blkid, "ULs*[!LU]", TOYFLAG_BIN))
@@ -97,7 +97,7 @@ USE_GROUPADD(NEWTOY(groupadd, "<1>2g#<0S", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
USE_GROUPDEL(NEWTOY(groupdel, "<1>2", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
USE_GROUPS(NEWTOY(groups, NULL, TOYFLAG_USR|TOYFLAG_BIN))
USE_GUNZIP(NEWTOY(gunzip, "cdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN))
-USE_GZIP(NEWTOY(gzip, "cdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_GZIP(NEWTOY(gzip, "ncdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN))
USE_REBOOT(OLDTOY(halt, reboot, TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
USE_HEAD(NEWTOY(head, "?n(lines)#<0=10c(bytes)#<0qv[-nc]", TOYFLAG_USR|TOYFLAG_BIN))
USE_HELLO(NEWTOY(hello, 0, TOYFLAG_USR|TOYFLAG_BIN))
@@ -135,7 +135,7 @@ USE_KILLALL5(NEWTOY(killall5, "?o*ls: [!lo][!ls]", TOYFLAG_SBIN))
USE_KLOGD(NEWTOY(klogd, "c#<1>8n", TOYFLAG_SBIN))
USE_LAST(NEWTOY(last, "f:W", TOYFLAG_BIN))
USE_LINK(NEWTOY(link, "<2>2", TOYFLAG_USR|TOYFLAG_BIN))
-USE_LN(NEWTOY(ln, "<1vnfs", TOYFLAG_BIN))
+USE_LN(NEWTOY(ln, "<1t:Tvnfs", TOYFLAG_BIN))
USE_LOAD_POLICY(NEWTOY(load_policy, "<1>1", TOYFLAG_USR|TOYFLAG_SBIN))
USE_LOG(NEWTOY(log, "<1p:t:", TOYFLAG_USR|TOYFLAG_SBIN))
USE_LOGGER(NEWTOY(logger, "st:p:", TOYFLAG_USR|TOYFLAG_BIN))
@@ -162,7 +162,7 @@ USE_MKFIFO(NEWTOY(mkfifo, "<1"USE_MKFIFO_Z("Z:")"m:", TOYFLAG_USR|TOYFLAG_BIN))
USE_MKNOD(NEWTOY(mknod, "<2>4m(mode):"USE_MKNOD_Z("Z:"), TOYFLAG_BIN|TOYFLAG_UMASK))
USE_MKPASSWD(NEWTOY(mkpasswd, ">2S:m:P#=0<0", TOYFLAG_USR|TOYFLAG_BIN))
USE_MKSWAP(NEWTOY(mkswap, "<1>1L:", TOYFLAG_SBIN))
-USE_MKTEMP(NEWTOY(mktemp, ">1uqd(directory)p(tmpdir):t", TOYFLAG_BIN))
+USE_MKTEMP(NEWTOY(mktemp, ">1(tmpdir);:uqd(directory)p:t", TOYFLAG_BIN))
USE_MODINFO(NEWTOY(modinfo, "<1b:k:F:0", TOYFLAG_SBIN))
USE_MODPROBE(NEWTOY(modprobe, "alrqvsDbd*", TOYFLAG_SBIN))
USE_MORE(NEWTOY(more, 0, TOYFLAG_USR|TOYFLAG_BIN))
@@ -201,7 +201,7 @@ USE_PS(NEWTOY(ps, "k(sort)*P(ppid)*aAdeflMno*O*p(pid)*s*t*Tu*U*g*G*wZ[!ol][+Ae][
USE_PWD(NEWTOY(pwd, ">0LP[-LP]", TOYFLAG_BIN))
USE_PWDX(NEWTOY(pwdx, "<1a", TOYFLAG_USR|TOYFLAG_BIN))
USE_READAHEAD(NEWTOY(readahead, NULL, TOYFLAG_BIN))
-USE_READLINK(NEWTOY(readlink, "<1>1nqmef(canonicalize)[-mef]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_READLINK(NEWTOY(readlink, "<1nqmef(canonicalize)[-mef]", TOYFLAG_USR|TOYFLAG_BIN))
USE_REALPATH(NEWTOY(realpath, "<1", TOYFLAG_USR|TOYFLAG_BIN))
USE_REBOOT(NEWTOY(reboot, "fn", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
USE_RENICE(NEWTOY(renice, "<1gpun#|", TOYFLAG_USR|TOYFLAG_BIN))
@@ -210,7 +210,7 @@ USE_RESTORECON(NEWTOY(restorecon, "<1DFnRrv", TOYFLAG_USR|TOYFLAG_SBIN))
USE_REV(NEWTOY(rev, NULL, TOYFLAG_USR|TOYFLAG_BIN))
USE_RFKILL(NEWTOY(rfkill, "<1>2", TOYFLAG_USR|TOYFLAG_SBIN))
USE_RM(NEWTOY(rm, "fiRrv[-fi]", TOYFLAG_BIN))
-USE_RMDIR(NEWTOY(rmdir, "<1p", TOYFLAG_BIN))
+USE_RMDIR(NEWTOY(rmdir, "<1(ignore-fail-on-non-empty)p", TOYFLAG_BIN))
USE_RMMOD(NEWTOY(rmmod, "<1wf", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
USE_ROUTE(NEWTOY(route, "?neA:", TOYFLAG_BIN))
USE_RUNCON(NEWTOY(runcon, "<2", TOYFLAG_USR|TOYFLAG_SBIN))
@@ -288,7 +288,7 @@ USE_VMSTAT(NEWTOY(vmstat, ">2n", TOYFLAG_BIN))
USE_W(NEWTOY(w, NULL, TOYFLAG_USR|TOYFLAG_BIN))
USE_WATCH(NEWTOY(watch, "^<1n%<100=2000tebx", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
USE_WC(NEWTOY(wc, "mcwl", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
-USE_WGET(NEWTOY(wget, "f:", TOYFLAG_USR|TOYFLAG_BIN))
+USE_WGET(NEWTOY(wget, "(no-check-certificate)O:", TOYFLAG_USR|TOYFLAG_BIN))
USE_WHICH(NEWTOY(which, "<1a", TOYFLAG_USR|TOYFLAG_BIN))
USE_WHO(NEWTOY(who, "a", TOYFLAG_USR|TOYFLAG_BIN))
USE_WHOAMI(OLDTOY(whoami, logname, TOYFLAG_USR|TOYFLAG_BIN))