[hackers] [sbase] Add mandoc-manpage for ln(1) || FRIGN

From: <git_AT_suckless.org>
Date: Mon, 26 Jan 2015 14:57:06 +0100 (CET)

commit 8e226698dc11cec7a5b0be6cb03372f6984a6a10
Author: FRIGN <dev_AT_frign.de>
Date: Mon Jan 26 14:54:22 2015 +0100

    Add mandoc-manpage for ln(1)
    
    and mark it as finished in the README.

diff --git a/README b/README
index a8f908a..a0f73cf 100644
--- a/README
+++ b/README
_AT_@ -37,7 +37,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
 = hostname non-posix none
 =* kill yes none
 =* link yes none
-= ln yes none
+=* ln yes none
 =* logger yes none
 = logname yes none
 = ls no -C, -R, -q, -u
diff --git a/ln.1 b/ln.1
index 3b1ac98..28f74b9 100644
--- a/ln.1
+++ b/ln.1
_AT_@ -1,36 +1,62 @@
-.TH LN 1 sbase\-VERSION
-.SH NAME
-ln \- make links between files
-.SH SYNOPSIS
-.B ln
-.RB [ \-LPfs ]
-.I file
-.RI [ name ]
-.P
-.B ln
-.RB [ \-LPfs ]
-.RI [ file ...]
-.RI [ directory ]
-.SH DESCRIPTION
-.B ln
-creates a hard link to a given file, with the given name. If no name is given
-it is linked into the current directory. If multiple files are listed they will
-be linked into the given directory.
-.SH OPTIONS
-.TP
-.B \-L
-create links to the files referenced by symbolic link source files (default
-behavior).
-.TP
-.B \-P
-create links to symbolic link source files themselves.
-.TP
-.B \-f
-remove existing destinations.
-.TP
-.B \-s
-create a symlink.
-.SH SEE ALSO
-.IR cp (1),
-.IR link (2),
-.IR symlink (2)
+.Dd January 26, 2015
+.Dt LN 1 sbase\-VERSION
+.Sh NAME
+.Nm ln
+.Nd link files
+.Sh SYNOPSIS
+.Nm ln
+.Op Fl f
+.Op Fl L | Fl P | Fl s
+.Ar target
+.Op Ar name
+.Nm ln
+.Op Fl f
+.Op Fl L | Fl P | Fl s
+.Ar target ...
+.Ar directory
+.Sh DESCRIPTION
+.Nm
+creates a hard link
+.Ar name
+to
+.Ar target .
+If no
+.Ar name
+is given, a hard link to
+.Ar target
+is created in the current directory.
+If more than one
+.Ar target
+is given,
+.Nm
+hardlinks them in the existing
+.Ar directory .
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl f
+If
+.Ar name
+exists, remove it to allow the link.
+.It Fl L | Fl P
+If
+.Ar target
+is a symbolic link, create a hard link to the (referenced file) | (symbolic link itself).
+The former is the default.
+.It Fl s
+Create symbolic links instead of hard links.
+Disables
+.Fl L
+and
+.Fl P ,
+because their purpose does not apply to symbolic links.
+.El
+.Sh SEE ALSO
+.Xr cp 1 ,
+.Xr link 2 ,
+.Xr symlink 2
+.Sh STANDARDS
+The
+.Nm
+utility is compliant with the
+.St -p1003.1-2008
+specification.
diff --git a/ln.c b/ln.c
index 5942f01..77e04b5 100644
--- a/ln.c
+++ b/ln.c
_AT_@ -13,8 +13,8 @@
 static void
 usage(void)
 {
- eprintf("usage: %1$s [-LPfs] target [linkname]\n"
- " %1$s [-LPfs] target... directory\n", argv0);
+ eprintf("usage: %1$s [-f] [-L | -P | -s] target [name]\n"
+ " %1$s [-f] [-L | -P | -s] target ... directory\n", argv0);
 }
 
 int
Received on Mon Jan 26 2015 - 14:57:06 CET

This archive was generated by hypermail 2.3.0 : Mon Jan 26 2015 - 15:00:12 CET