#undef FLAG_a
#endif
-// stat c:f c:f
+// stat <1c:f <1c:f
#undef OPTSTR_stat
-#define OPTSTR_stat "c:f"
+#define OPTSTR_stat "<1c:f"
#ifdef CLEANUP_stat
#undef CLEANUP_stat
#undef FOR_stat
struct find_data {
char **filter;
struct double_list *argdata;
- int topdir, xdev, depth, envsize;
+ int topdir, xdev, depth;
time_t now;
};
#define help_grep "usage: grep [-EFivwcloqsHbhn] [-m MAX] [-e REGEX]... [-f REGFILE] [FILE]...\n\nShow lines matching regular expressions. If no -e, first argument is\nregular expression to match. With no files (or \"-\" filename) read stdin.\nReturns 0 if matched, 1 if no match found.\n\n-e Regex to match. (May be repeated.)\n-f File containing regular expressions to match.\n\nmatch type:\n-E extended regex syntax -F fixed (match literal string)\n-i case insensitive -m stop after this many lines matched\n-r recursive (on dir) -v invert match\n-w whole word (implies -E) -x whole line\n-z input NUL terminated\n\ndisplay modes: (default: matched line)\n-c count of matching lines -l show matching filenames\n-o only matching part -q quiet (errors only)\n-s silent (no error msg) -Z output NUL terminated\n\noutput prefix (default: filename if checking more than 1 file)\n-H force filename -b byte offset of match\n-h hide filename -n line number of match\n\n"
-#define help_find "usage: find [-HL] [DIR...] [<options>]\n\nSearch directories for matching files.\nDefault: search \".\" match all -print all matches.\n\n-H Follow command line symlinks -L Follow all symlinks\n\nMatch filters:\n-name PATTERN filename with wildcards -iname case insensitive -name\n-path PATTERN path name with wildcards -ipath case insensitive -path\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 contents of dir\n-size N[c] 512 byte blocks (c=bytes) -xdev only this filesystem\n-links N hardlink count -atime N accessed N days ago\n-ctime N created N days ago -mtime N modified N days ago\n-newer FILE newer mtime than FILE -mindepth # at least # dirs down\n-depth ignore contents of dir -maxdepth # at most # dirs down\n-inum N inode number N\n-type [bcdflps] (block, char, dir, file, symlink, pipe, socket)\n\nNumbers N may be prefixed by a - (less than) or + (greater than):\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\nCommands substitute \"{}\" with matched file. End with \";\" to run each file,\nor \"+\" (next argument after \"{}\") to collect and run with multiple files.\n\n"
+#define help_find "usage: find [-HL] [DIR...] [<options>]\n\nSearch directories for matching files.\nDefault: search \".\" match all -print all matches.\n\n-H Follow command line symlinks -L Follow all symlinks\n\nMatch filters:\n-name PATTERN filename with wildcards -iname case insensitive -name\n-path PATTERN path name with wildcards -ipath case insensitive -path\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 contents of dir\n-size N[c] 512 byte blocks (c=bytes) -xdev only this filesystem\n-links N hardlink count -atime N accessed N days ago\n-ctime N created N days ago -mtime N modified N days ago\n-newer FILE newer mtime than FILE -mindepth # at least # dirs down\n-depth ignore contents of dir -maxdepth # at most # dirs down\n-inum N inode number N -empty empty files and dirs\n-type [bcdflps] (block, char, dir, file, symlink, pipe, socket)\n\nNumbers N may be prefixed by a - (less than) or + (greater than):\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\nCommands substitute \"{}\" with matched file. End with \";\" to run each file,\nor \"+\" (next argument after \"{}\") to collect and run with multiple files.\n\n"
#define help_false "Return nonzero.\n\n"
USE_SLEEP(NEWTOY(sleep, "<1", TOYFLAG_BIN))
USE_SORT(NEWTOY(sort, USE_SORT_FLOAT("g")USE_SORT_BIG("S:T:m" "o:k*t:xbMcszdfi") "run", TOYFLAG_USR|TOYFLAG_BIN))
USE_SPLIT(NEWTOY(split, ">2a#<1=2>9b#<1l#<1", TOYFLAG_USR|TOYFLAG_BIN))
-USE_STAT(NEWTOY(stat, "c:f", TOYFLAG_BIN))
+USE_STAT(NEWTOY(stat, "<1c:f", TOYFLAG_BIN))
USE_STRINGS(NEWTOY(strings, "an#=4<1fo", TOYFLAG_USR|TOYFLAG_BIN))
USE_SU(NEWTOY(su, "lmpc:s:", TOYFLAG_BIN|TOYFLAG_ROOTONLY))
USE_SULOGIN(NEWTOY(sulogin, "t#<0=0", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
#define _KEY_END (1<<7)
#define KEY_INSERT 8
#define _KEY_INSERT (1<<8)
-#define KEY_SUP 9
-#define _KEY_SUP (1<<9)
-#define KEY_AUP 10
-#define _KEY_AUP (1<<10)
-#define KEY_CUP 11
-#define _KEY_CUP (1<<11)
-#define KEY_SDOWN 12
-#define _KEY_SDOWN (1<<12)
-#define KEY_ADOWN 13
-#define _KEY_ADOWN (1<<13)
-#define KEY_CDOWN 14
-#define _KEY_CDOWN (1<<14)
-#define KEY_SRIGHT 15
-#define _KEY_SRIGHT (1<<15)
-#define KEY_ARIGHT 16
-#define _KEY_ARIGHT (1<<16)
-#define KEY_CRIGHT 17
-#define _KEY_CRIGHT (1<<17)
-#define KEY_SLEFT 18
-#define _KEY_SLEFT (1<<18)
-#define KEY_ALEFT 19
-#define _KEY_ALEFT (1<<19)
-#define KEY_CLEFT 20
-#define _KEY_CLEFT (1<<20)
+#define KEY_F1 9
+#define _KEY_F1 (1<<9)
+#define KEY_F2 10
+#define _KEY_F2 (1<<10)
+#define KEY_F3 11
+#define _KEY_F3 (1<<11)
+#define KEY_F4 12
+#define _KEY_F4 (1<<12)
+#define KEY_F5 13
+#define _KEY_F5 (1<<13)
+#define KEY_F6 14
+#define _KEY_F6 (1<<14)
+#define KEY_F7 15
+#define _KEY_F7 (1<<15)
+#define KEY_F8 16
+#define _KEY_F8 (1<<16)
+#define KEY_F9 17
+#define _KEY_F9 (1<<17)
+#define KEY_SUP 18
+#define _KEY_SUP (1<<18)
+#define KEY_AUP 19
+#define _KEY_AUP (1<<19)
+#define KEY_CUP 20
+#define _KEY_CUP (1<<20)
+#define KEY_SDOWN 21
+#define _KEY_SDOWN (1<<21)
+#define KEY_ADOWN 22
+#define _KEY_ADOWN (1<<22)
+#define KEY_CDOWN 23
+#define _KEY_CDOWN (1<<23)
+#define KEY_SRIGHT 24
+#define _KEY_SRIGHT (1<<24)
+#define KEY_ARIGHT 25
+#define _KEY_ARIGHT (1<<25)
+#define KEY_CRIGHT 26
+#define _KEY_CRIGHT (1<<26)
+#define KEY_SLEFT 27
+#define _KEY_SLEFT (1<<27)
+#define KEY_ALEFT 28
+#define _KEY_ALEFT (1<<28)
+#define KEY_CLEFT 29
+#define _KEY_CLEFT (1<<29)
+#define KEY_SF1 30
+#define _KEY_SF1 (1<<30)
+#define KEY_AF1 31
+#define _KEY_AF1 (1<<31)
+#define KEY_CF1 32
+#define _KEY_CF1 (1LL<<32)