From 8029e1836c7cb14fc7096a781896edd3c5ce682d Mon Sep 17 00:00:00 2001 From: Holger Just Date: Thu, 9 Feb 2012 11:42:35 +0100 Subject: [PATCH] Simple http server in the current directory --- .bashrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 4a76265..8fb6921 100755 --- a/.bashrc +++ b/.bashrc @@ -246,7 +246,10 @@ alias rs="rails server -b 127.0.0.1" alias rc="rails console" ss() { if [[ -x script/server ]]; then script/server -b 127.0.0.1 $@; else rs $@; fi } sc() { if [[ -x script/console ]]; then script/console $@; else rc $@; fi } - +http() { + port=${1:-8000} + python -m SimpleHTTPServer $port +} # if cat is called on a directory, call ls instead cat() {