Function: eshell/ln

eshell/ln is a byte-compiled function defined in em-unix.el.gz.

Signature

(eshell/ln &rest ARGS)

Documentation

Implementation of ln in Lisp.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/em-unix.el.gz
(defun eshell/ln (&rest args)
  "Implementation of ln in Lisp."
  (eshell-eval-using-options
   "ln" args
   '((?h "help" nil nil "show this usage screen")
     (?s "symbolic" nil symbolic
	 "make symbolic links instead of hard links")
     (?i "interactive" nil em-interactive
	 "request confirmation if target already exists")
     (?f "force" nil force "remove existing destinations, never prompt")
     (?n "preview" nil em-preview
	 "don't change anything on disk")
     (?v "verbose" nil em-verbose "explain what is being done")
     :preserve-args
     :external "ln"
     :show-usage
     :usage "[OPTION]... TARGET LINK_NAME
   or: ln [OPTION]... TARGET... DIRECTORY
Create a link to the specified TARGET with LINK_NAME.  If there is more
than one TARGET, the last argument must be a directory;  create links in
DIRECTORY to each TARGET.  Create hard links by default, symbolic links
with `--symbolic'.  When creating hard links, each TARGET must exist.")
   (let ((no-dereference t))
     (eshell-mvcpln-template "ln" "linking"
			     (if symbolic
				 'make-symbolic-link
			       'add-name-to-file)
                             (eshell-interactive-query-p
                              eshell-ln-interactive-query)
			     eshell-ln-overwrite-files))))