Skip to content

Instantly share code, notes, and snippets.

@lmarburger
Forked from powellnathanj/gist:346482
Created March 28, 2010 18:44

Revisions

  1. lmarburger renamed this gist Mar 28, 2010. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. lmarburger renamed this gist Mar 28, 2010. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. lmarburger revised this gist Mar 28, 2010. 3 changed files with 40 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    larry(){
    history|sort -r|sed -s 's/^ [0-9]* //'|while read i;do if [[ "$i" =~ ^ruby || "$i" =~ ^cuc ]];then echo $i|sh;exit;fi;done
    exec_last_feature_or_test(){
    history|sort -r|sed -s 's/^ [0-9]* //'|while read i;do if [[ "$i" =~ ^ruby || "$i" =~ ^cucumber ]];then echo $i|sh;exit;fi;done
    }
    31 changes: 31 additions & 0 deletions output.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    $ exec_last_feature_or_test
    Loaded suite test/unit/item_test
    Started
    stty: stdin isn't a terminal

    Item
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .

    23 tests: all passed
    7 changes: 7 additions & 0 deletions output_expected.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    $ ruby -Itest test/unit/item_test.rb
    Loaded suite test/unit/item_test
    Started

    Item .......................

    23 tests: all passed
  4. @powellnathanj powellnathanj revised this gist Mar 28, 2010. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@
    larry(){
    history | sort -r | sed -s 's/^ [0-9]* //' | while read i;do if [[ "$i" =~ ^ruby || "$i" =~ ^cucumber ]];then echo $i | sh ;exit;fi;done
    history|sort -r|sed -s 's/^ [0-9]* //'|while read i;do if [[ "$i" =~ ^ruby || "$i" =~ ^cuc ]];then echo $i|sh;exit;fi;done
    }

  5. @powellnathanj powellnathanj revised this gist Mar 28, 2010. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    larry(){
    history | sort -r | while read i;do if [[ "$i" =~ "ruby" || "$i" =~ "cucumber" ]];then echo $(echo $i | sed 's/^[0-9]* //') | sh ;exit;fi;done
    history | sort -r | sed -s 's/^ [0-9]* //' | while read i;do if [[ "$i" =~ ^ruby || "$i" =~ ^cucumber ]];then echo $i | sh ;exit;fi;done
    }

  6. @powellnathanj powellnathanj created this gist Mar 28, 2010.
    3 changes: 3 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    larry(){
    history | sort -r | while read i;do if [[ "$i" =~ "ruby" || "$i" =~ "cucumber" ]];then echo $(echo $i | sed 's/^[0-9]* //') | sh ;exit;fi;done
    }