Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rc comment punctuation

  • Loading branch information...
commit fb90a3645de2a3f3c37e29c18b7c017c4882445f 1 parent 84a4020
Daniel Corson authored
Showing with 12 additions and 9 deletions.
  1. +7 −6 rc.example.php
  2. +5 −3 src/rc.php
13 rc.example.php
View
@@ -1,16 +1,16 @@
<?php
-# copy this file to ~/.phpsh/rc.php via:
+# Copy this file to ~/.phpsh/rc.php via:
# mkdir -p ~/.phpsh && cp rc.example.php ~/.phpsh/rc.php
-# load any system defaults / codebase-modes
+# Load any system defaults / codebase-modes.
require_once '/etc/phpsh/rc.php';
-# the examples here are some functions i use for easy io with the outside world
+# The examples here are for easy IO with the outside world.
define('DEFAULT_IO_FILE', getenv('HOME').'/o');
/**
- * append array or var to ~/o
+ * Append array or var to ~/o.
* @author dcorson
*/
function o($x, $fn=DEFAULT_IO_FILE) {
@@ -25,7 +25,7 @@ function o($x, $fn=DEFAULT_IO_FILE) {
}
/**
- * strip last char (typically used to kill "\n") from line
+ * Strip last char (typically used to kill "\n") from line.
* @author dcorson
*/
function _rstrip($l) {
@@ -33,9 +33,10 @@ function _rstrip($l) {
}
/**
- * read array from ~/o
+ * Read array from ~/o.
* @author dcorson
*/
function i($fn=DEFAULT_IO_FILE) {
return array_map('_rstrip', file($fn));
}
+
8 src/rc.php
View
@@ -2,11 +2,12 @@
// Have this file include/do anything to set up your php codebase environment.
// Expect it to run from the top of your repo, where you should start phpsh
-// from. Run ctags from the top of your repo periodically too, to get the
-// benefits of phpsh ctags integration.
+// from (or add top-of-repo-finding logic here, etc). Run ctags from the top
+// of your repo periodically too, to get the benefits of phpsh ctags
+// integration.
// You may make use of the string $___phpsh___codebase_mode which may be
-// specified on phpsh startup via -C. The string is '' by default.
+// specified on phpsh startup via -c. The string is '' by default.
// E_ALL catches certain coding errors and we recommend it. Comment this out
@@ -36,3 +37,4 @@
fwrite(STDERR, 'Unknown codebase mode '.$___phpsh___codebase_mode."\n");
break;
}
+
Please sign in to comment.
Something went wrong with that request. Please try again.