From 44b9fd0fbf5672e101c9ea241b8758f185fac916 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 21 Aug 2011 13:04:01 -0500 Subject: alias to launch a fileserver in the current directory --- bashrc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bashrc') diff --git a/bashrc b/bashrc index 8b648bd..22d8778 100644 --- a/bashrc +++ b/bashrc @@ -96,6 +96,14 @@ alias ..='cd ..' alias dotperl="rsync -av lib/* ${HOME}/perl5/local/" alias clean_packages='sudo pacman -Rsn $(pacman -Qqdt)' alias pm="find lib -type f | sort" +function web { + local port=$1 + if [[ -z $port ]]; then + plackup -MPlack::App::Directory -e'Plack::App::Directory->new' + else + plackup -MPlack::App::Directory -e'Plack::App::Directory->new' --port $port + fi +} function perldoc { if type -P cpandoc > /dev/null 2>&1; then cpandoc "$@" -- cgit v1.2.3-54-g00ecf