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

From: <git_AT_suckless.org>
Date: Tue, 24 Mar 2015 23:53:18 +0100 (CET)

commit 00e7f4e38a5aae64e6328670809e63a26c42b6ba
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
-ln \- make links between files
-.B ln
-.RB [ \-LPfs ]
-.I file
-.RI [ name ]
-.B ln
-.RB [ \-LPfs ]
-.RI [ file ...]
-.RI [ directory ]
-.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.
-.B \-L
-create links to the files referenced by symbolic link source files (default
-.B \-P
-create links to symbolic link source files themselves.
-.B \-f
-remove existing destinations.
-.B \-s
-create a symlink.
-.IR cp (1),
-.IR link (2),
-.IR symlink (2)
+.Dd January 26, 2015
+.Dt LN 1 sbase\-VERSION
+.Nm ln
+.Nd link files
+.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
+creates a hard link
+.Ar name
+.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,
+hardlinks them in the existing
+.Ar directory .
+.Bl -tag -width Ds
+.It Fl f
+.Ar name
+exists, remove it to allow the link.
+.It Fl L | Fl P
+.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.
+.Fl L
+.Fl P ,
+because their purpose does not apply to symbolic links.
+.Xr cp 1 ,
+.Xr link 2 ,
+.Xr symlink 2
+utility is compliant with the
+.St -p1003.1-2008
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
- 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);
Received on Tue Mar 24 2015 - 23:53:18 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 25 2015 - 00:03:43 CET