Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adjusted rm_rf

  • Loading branch information...
commit 724fcfd4b0910548ebbc0c49b5a8ac04ce88e281 1 parent 082acac
@wayneeseguin wayneeseguin authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  scripts/functions/cleanup
View
3  scripts/functions/cleanup
@@ -8,13 +8,14 @@ __rvm_rm_rf()
local result=1 target="${1%%+(/|.)}"
#NOTE: RVM Requires extended globbing shell feature turned on.
+ shopt -s extglob
case "${target}" in
(*(/|.)@(|/Applications|/Developer|/Guides|/Information|/Library|/Network|/System|/User|/Users|/Volumes|/backups|/bdsm|/bin|/boot|/cores|/data|/dev|/etc|/home|/lib|/lib64|/mach_kernel|/media|/misc|/mnt|/net|/opt|/private|/proc|/root|/sbin|/selinux|/srv|/sys|/tmp|/usr|/var))
false
;;
- *)
+ (*)
if [[ -n "${target}" ]] ; then
if [[ -d "${target}" ]] ; then # Directory

4 comments on commit 724fcfd

@mbunkus

This commit causes zsh to omit errors that shopt is an unknown function. shopt is a bashism, and I thought that "scripts/initialize" took care of extglob already -- and in a portable way (meaning "shopt -s extglob" for bash and "setop extendedglob" for zsh).

@mbunkus

omit = emit, of course :)

@jcf

Any chance of getting this fixed soon?

Please sign in to comment.
Something went wrong with that request. Please try again.