Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PWS :reload



On May 12,  5:00pm, zzapper wrote:
}
} >reload() {
} >while (( $# )); do
} >  unfunction $1 2>/dev/null
} >  autoload $1
} >  shift
} >done
} >}
} >
} Can I have a warning that the function wasn't already loaded?

We're venturing into the realm of "you should be able to do this yourself."

E.g., just take out the 2>/dev/null

Or:

reload() {
while (( $# )); do
  unfunction $1 2>/dev/null || print -u2 "$1 loading for the first time"
  autoload $1
  shift
done

Or whatever ...



Messages sorted by: Reverse Date, Date, Thread, Author