diff --git a/cake/console/cake b/cake/console/cake index 1257251d698..cd7256cd02c 100755 --- a/cake/console/cake +++ b/cake/console/cake @@ -22,8 +22,6 @@ # @license http://www.opensource.org/licenses/mit-license.php The MIT License # ################################################################################ -clear - LIB=${0/%cake/} APP=`pwd` diff --git a/cake/console/cake.php b/cake/console/cake.php index 5679166ec80..c0b3fe5b21e 100644 --- a/cake/console/cake.php +++ b/cake/console/cake.php @@ -286,6 +286,22 @@ function __bootstrap() { return true; } +/** + * Clear the console + * + * @return void + * @access public + */ + function clear() { + if (empty($this->params['noclear'])) { + if ( DS === '/') { + passthru('clear'); + } else { + passthru('cls'); + } + } + } + /** * Dispatches a CLI request * @@ -557,6 +573,7 @@ function shiftArgs() { * @access public */ function help() { + $this->clear(); $this->stdout("\nWelcome to CakePHP v" . Configure::version() . " Console"); $this->stdout("---------------------------------------------------------------"); $this->stdout("Current Paths:"); diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index c5e32201237..824d0d3194f 100644 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -204,6 +204,7 @@ function startup() { * @access protected */ function _welcome() { + $this->Dispatcher->clear(); $this->out("\nWelcome to CakePHP v" . Configure::version() . " Console"); $this->out("---------------------------------------------------------------"); $this->out('App : '. $this->params['app']);