Re: CLI command naming conventions?

From: Date: Sat, 12 Apr 2008 10:09:32 +0000
Subject: Re: CLI command naming conventions?
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49760@lists.php.net to get a copy of this message
I'm also not aware of any *conventions* per se, though based on the few CLI utility apps that I've seen in PEAR, it looks like the main thing would be for the name to semi-reasonably match the package name that it is the key runtime script for: - pear - PEAR - pearsize - PEAR_Size - phpdoc - PhpDocumentor - phpcs - PHP_Codesniffer - docblockgen - PHP_DocBlockGenerator - php_beautifier - PHP_Beautifier
Just to add it to the list:
    - phpdt - Testing_DocTest;
    - php-shell - PHP_Shell;
    - pci - PHP_CompatInfo;
    - DB_DataObject_createTables.bat - DB_DataObject;
    - gtkmdbdesigner - GTK_MDB_Designer;
    - system-procwatch/system-procwatch-lint - System_ProcWatch;
    - t2xmlchk.php - Translation2.
Maybe the recommandation could be:
    - prefix with "php-" (or "pear-" ?) in order to minimize conflicts with others command line programs (eg. php-doctest);
    - use a lowercase name not too long (say: <= 15);
    - use a hiphen if you want to separate parts of the name (eg. php-system-procwatch);
    - create a "<name>.bat" for windows users.
-- David.

« previous php.pear.dev (#49760) next »