In the 1st form, create a link to TARGET with the name LINK_NAME. In the 2nd
form, create a link to TARGET in the current directory. In the 3rd form, create
links to each TARGET in DIRECTORY."
-
+
if [[ $1 == --help || $# -eq 0 ]]; then
echo "$help"
return 0
return 1
fi
fi
-
+
local reset_extglob=false
! shopt extglob >/dev/null && reset_extglob=true
shopt -s extglob
-
+
local remove x
if type -P trash-put >/dev/null; then
remove=trash-put
else
remove="rm -rf"
fi
-
+
if [[ $nodir ]]; then
if [[ -e "$2" || -L "$2" ]]; then
$remove "$2"
[[ -e "${1##*/}" || -L "${1##*/}" ]] && $remove "${1##*/}"
fi
- $reset_extglob && shopt -u extglob
+ $reset_extglob && shopt -u extglob
ln -s $nodir -- "$@"
}