Permalink
Browse files

Adjusted rm_rf

  • Loading branch information...
1 parent 082acac commit 724fcfd4b0910548ebbc0c49b5a8ac04ce88e281 @wayneeseguin wayneeseguin committed Apr 5, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 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
mbunkus commented on 724fcfd Apr 8, 2011

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
mbunkus commented on 724fcfd Apr 8, 2011

omit = emit, of course :)

@jcf
Contributor
jcf commented on 724fcfd Apr 9, 2011

Any chance of getting this fixed soon?

Please sign in to comment.