Skip to content

Commit

Permalink
Adjusted rm_rf
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Apr 5, 2011
1 parent 082acac commit 724fcfd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/functions/cleanup
Expand Up @@ -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
Expand Down

4 comments on commit 724fcfd

@mbunkus
Copy link

@mbunkus mbunkus commented on 724fcfd Apr 8, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

@mbunkus mbunkus commented on 724fcfd Apr 8, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omit = emit, of course :)

@jcf
Copy link
Contributor

@jcf jcf commented on 724fcfd Apr 9, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance of getting this fixed soon?

@wayneeseguin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.