aboutsummaryrefslogtreecommitdiff
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
...
* Add the SUSv3 -p ("portable") option to both the export and readonlyTim J. Robbins2002-06-062-3/+47
| | | | | | | | builtins. This makes export/readonly print lines in the form "export name=value". Notes: svn path=/head/; revision=97914
* Don't modify output that is to be quoted if it contains no IFS charactersTim J. Robbins2002-06-061-0/+7
| | | | | | | or shell metacharacters. Notes: svn path=/head/; revision=97909
* Widen the scope of fmt.c::1.19 and consistently use errx(3) if malloc(3) [orJuli Mallett2002-06-053-10/+8
| | | | | | | | | | | | | realloc(3)] happens to fail, everywhere in ps(1). Discussed with: bde, charnier (a while ago) fmt_argv() can no longer return NULL, so don't bother checking. Submitted by: bde Notes: svn path=/head/; revision=97877
* Comma seperate format lists, since space is no longer up to the task.Juli Mallett2002-06-051-6/+6
| | | | | | | | Poked by: David Wolfskill <david@catwhisker.org> Pointy hat to: jmallett Notes: svn path=/head/; revision=97875
* Support the 'comm' keyword, which is equivalent to our 'command', butJuli Mallett2002-06-051-0/+2
| | | | | | | specified by SUSv3. Notes: svn path=/head/; revision=97850
* A space cannot be a header string seperator it appears given the SUSv3Juli Mallett2002-06-051-1/+1
| | | | | | | | description of ps(1), which uses them. I question whether newline and tab can be either, but I'm not touching them. Yet. Notes: svn path=/head/; revision=97849
* To comply with SUSv3, duplicate the variable contents for each given format,Juli Mallett2002-06-051-1/+4
| | | | | | | | | | | | | | | so that multiple -ovar=header lines do not overwrite eachother. This means that ps -ouser=USERNAME -ouser=WHO would now possibly print: USERNAME WHO juli juli Whereas before it would be: WHO WHO juli juli Notes: svn path=/head/; revision=97848
* Returning NULL here if malloc(3) fails is silly, at this point in the codepathJuli Mallett2002-06-051-1/+1
| | | | | | | | we have't malloc(3)'d nearly as much as we probably will, so errx(3) away, instead of waiting for something to fail yet again later on. Notes: svn path=/head/; revision=97847
* Remove an XXX comment that seems to be a tiny bit no longer pertinent. ThisJuli Mallett2002-06-051-4/+0
| | | | | | | | | function seems to do the right thing, and is not a "stub", and whoever "marc" is, he's had plenty of time to do "the real one", so don't wait around for him any longer. Notes: svn path=/head/; revision=97846
* Use of zero here meant many things, NULL, '\0' (NUL), and 0. Sort it out.Juli Mallett2002-06-051-5/+5
| | | | Notes: svn path=/head/; revision=97845
* Use a const char * where it is meant to be used. There's no reason to tryJuli Mallett2002-06-051-1/+2
| | | | | | | to discard the const qualifier here. Notes: svn path=/head/; revision=97843
* Duplicate the pointer to the string containing the header so it does not getJuli Mallett2002-06-051-1/+1
| | | | | | | frobbed when/if the pointer it is actually a part of gets freed. Notes: svn path=/head/; revision=97842
* Display job status correctly when a pipeline is suspended.Tim J. Robbins2002-06-041-6/+8
| | | | Notes: svn path=/head/; revision=97822
* Describe finished jobs as "Done", not "Exit" (SUSv3)Tim J. Robbins2002-06-041-1/+5
| | | | Notes: svn path=/head/; revision=97820
* Don't output `state' and `current' fields for processes that aren'tTim J. Robbins2002-06-041-3/+5
| | | | | | | leaders in -l option to jobs(1). Notes: svn path=/head/; revision=97819
* Missing prototypes from previous commit.Tim J. Robbins2002-06-041-0/+3
| | | | Notes: svn path=/head/; revision=97817
* Correct minor spacing problem in output of jobs -l for pipelines.Tim J. Robbins2002-06-041-1/+1
| | | | Notes: svn path=/head/; revision=97816
* Quote alias values in the output of the alias(1) builtin so they areTim J. Robbins2002-06-043-5/+44
| | | | | | | suitable for re-input to the shell (SUSv3) Notes: svn path=/head/; revision=97815
* Respect setting of the COLUMNS environment variable (SUSv3)Tim J. Robbins2002-06-042-1/+14
| | | | Notes: svn path=/head/; revision=97804
* Ignore empty COLUMNS environment variable. COLUMNS should take precedenceTim J. Robbins2002-06-041-5/+5
| | | | | | | over TTY width found via ioctl() (SUSv3) Notes: svn path=/head/; revision=97803
* Correct history (again): V3 had a kill command, only it was in section 8,Tim J. Robbins2002-06-031-1/+1
| | | | | | | not 1. Notes: svn path=/head/; revision=97772
* Correct History: sync(8) appeared in V4.Tim J. Robbins2002-06-031-1/+1
| | | | Notes: svn path=/head/; revision=97768
* Correct History section: kill(1) appeared in V4, not V6.Tim J. Robbins2002-06-031-1/+1
| | | | Notes: svn path=/head/; revision=97767
* Fix typo causing ``fc -e'' to not work correctly. getopt() sets optarg,Tim J. Robbins2002-06-021-1/+1
| | | | | | | not shoptarg. Notes: svn path=/head/; revision=97731
* Adding an entry to the history with H_ENTER moves libedit's internalTim J. Robbins2002-06-021-0/+9
| | | | | | | | history cursor. Reset the cursor after adding the entry to the history when doing ``fc -s'' so the output is correct. Notes: svn path=/head/; revision=97730
* Implement $PPID, the parent process ID of the shell.Tim J. Robbins2002-06-012-0/+9
| | | | Notes: svn path=/head/; revision=97689
* Support the remaining job ID formats required by SUSv3:Tim J. Robbins2002-06-011-2/+21
| | | | | | | | | %+ (current job, same as %%), %- (previous job), %?str (job with "str" in its command name). Notes: svn path=/head/; revision=97688
* Add -s (output PID's only) and -l (show PID's) options to the jobs(1)Tim J. Robbins2002-05-314-18/+85
| | | | | | | builtin. Modify the output format to match what SUSv3 requires. Notes: svn path=/head/; revision=97669
* #if JOBS around a job control-related statement to allow compilation withTim J. Robbins2002-05-311-0/+2
| | | | | | | job control disabled. Notes: svn path=/head/; revision=97664
* Break the code to display status info for one job out from showjobs() intoTim J. Robbins2002-05-311-63/+52
| | | | | | | | showjob(), use it inside dowait() to display status info for consistency, and in a format closer to what the standard requires. Notes: svn path=/head/; revision=97663
* Move job to front of most recently used job list when bg'd or fg'd.Tim J. Robbins2002-05-311-0/+1
| | | | Notes: svn path=/head/; revision=97660
* Instead of keeping just the jobid of the most recently bg'd or fg'd job,Tim J. Robbins2002-05-312-9/+85
| | | | | | | | | keep a linked list of the jobs, most recently used first. This is required to support the idea of `previous job', and to allow the jobs fg and bg default to be correct according to POSIX. Notes: svn path=/head/; revision=97659
* mdoc(7) police: kill hard sentence breaks.Ruslan Ermilov2002-05-301-3/+5
| | | | Notes: svn path=/head/; revision=97604
* Reject options, handle "--" correctly in unlink(1).Tim J. Robbins2002-05-301-4/+7
| | | | Notes: svn path=/head/; revision=97533
* Reject options, handle "--" end-of-options marker in link(1).Tim J. Robbins2002-05-301-4/+7
| | | | Notes: svn path=/head/; revision=97531
* mdoc(7) police: punctuation.Ruslan Ermilov2002-05-291-1/+1
| | | | Notes: svn path=/head/; revision=97502
* mdoc(7) police: tidy up the markup a bit.Ruslan Ermilov2002-05-291-142/+41
| | | | Notes: svn path=/head/; revision=97465
* mdoc(7) police: markup nits.Ruslan Ermilov2002-05-291-11/+11
| | | | Notes: svn path=/head/; revision=97464
* mdoc(7) police: markup nits.Ruslan Ermilov2002-05-291-2/+3
| | | | Notes: svn path=/head/; revision=97463
* mdoc(7) police: punctuation.Ruslan Ermilov2002-05-291-3/+3
| | | | Notes: svn path=/head/; revision=97462
* mdoc(7) police: replace the XXX with the correct width.Ruslan Ermilov2002-05-291-2/+1
| | | | Notes: svn path=/head/; revision=97458
* Add uuidgen(2) and uuidgen(1).Marcel Moolenaar2002-05-283-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The uuidgen command, by means of the uuidgen syscall, generates one or more Universally Unique Identifiers compatible with OSF/DCE 1.1 version 1 UUIDs. From the Perforce logs (change 11995): Round of cleanups: o Give uuidgen() the correct prototype in syscalls.master o Define struct uuid according to DCE 1.1 in sys/uuid.h o Use struct uuid instead of uuid_t. The latter is defined in sys/uuid.h but should not be used in kernel land. o Add snprintf_uuid(), printf_uuid() and sbuf_printf_uuid() to kern_uuid.c for use in the kernel (currently geom_gpt.c). o Rename the non-standard struct uuid in kern/kern_uuid.c to struct uuid_private and give it a slightly better definition for better byte-order handling. See below. o In sys/gpt.h, fix the broken uuid definitions to match the now compliant struct uuid definition. See below. o In usr.bin/uuidgen/uuidgen.c catch up with struct uuid change. A note about byte-order: The standard failed to provide a non-conflicting and unambiguous definition for the binary representation. My initial implementation always wrote the timestamp as a 64-bit little-endian (2s-complement) integral. The clock sequence was always written as a 16-bit big-endian (2s-complement) integral. After a good nights sleep and couple of Pan Galactic Gargle Blasters (not necessarily in that order :-) I reread the spec and came to the conclusion that the time fields are always written in the native by order, provided the the low, mid and hi chopping still occurs. The spec mentions that you "might need to swap bytes if you talk to a machine that has a different byte-order". The clock sequence is always written in big-endian order (as is the IEEE 802 address) because its division is resulting in bytes, making the ordering unambiguous. Notes: svn path=/head/; revision=97372
* Note that the lutimes(2) and lchflags(2) syscalls also do not follow symlinks.Tim J. Robbins2002-05-261-13/+16
| | | | | | | | | | Remove incorrect examples. PR: 25016 Submitted by: Martin Kammerhofer, Joshua Goodall Notes: svn path=/head/; revision=97305
* Add lchmod(2) to the list of syscalls that do not follow symbolic links.Tim J. Robbins2002-05-261-1/+3
| | | | Notes: svn path=/head/; revision=97304
* sh appeared in Version 1, not System V.1.Tim J. Robbins2002-05-251-1/+1
| | | | Notes: svn path=/head/; revision=97277
* Implement `set +o', which displays the currently set options in a formatTim J. Robbins2002-05-252-5/+28
| | | | | | | suitable for re-input into the shell. Notes: svn path=/head/; revision=97276
* Bring back the cd -L and -P options from revision 1.24, but try harder notTim J. Robbins2002-05-221-33/+105
| | | | | | | | | to fail when the logical current directory no longer exists. Allow changes to absolute paths when logical cwd is invalid, fall back to physical cd if logical cd fails. Notes: svn path=/head/; revision=97092
* Temporarily back out revision 1.24; it seems to handle the case where theTim J. Robbins2002-05-221-78/+22
| | | | | | | current directory no longer exists incorrectly and breaks `make cleandir'. Notes: svn path=/head/; revision=97091
* Add the SUSv3 -L and -P options to the cd and pwd builtin utilities. `Logical'Tim J. Robbins2002-05-202-24/+110
| | | | | | | handling of .. is now the default. Notes: svn path=/head/; revision=96980
* Remove a small, annoying, nit I ran in to editing this file, a lone tabJuli Mallett2002-05-191-1/+1
| | | | | | | on a line by itself. Notes: svn path=/head/; revision=96948