Revision 9831
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
807 | 807 |
|
808 | 808 |
alias wildcard='shopt -s nullglob; echo' # usage: "$(wildcard glob...)" |
809 | 809 |
|
810 |
fi # load new aliases |
|
811 |
if self_being_included; then |
|
810 | 812 |
|
813 |
mv2dir() { echo_func; mkdir "${!#}"; mv "$@"; } # usage: mv2dir ... dir |
|
814 |
|
|
815 |
# usage: (mv_glob ... dir) |
|
816 |
function mv_glob() { echo_func; if (($# > 1)); then mv2dir "$@"; fi; } |
|
817 |
alias mv_glob='shopt -s nullglob; "mv_glob"' |
|
818 |
|
|
819 |
|
|
811 | 820 |
#### URLs |
812 | 821 |
|
813 | 822 |
localize_url() { test _"$1" = _"$(hostname -f)" || echo "$1"; } |
Also available in: Unified diff
lib/sh/util.sh: added mv2dir(), mv_glob which wrap mv