From 42d5c26ae2f903349f39b6ec2fc0422234499310 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Sat, 31 Dec 2011 11:49:56 +0100 Subject: `server`: Use parameter expansion instead of a fake ternary --- .functions | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.functions') diff --git a/.functions b/.functions index 4301825..990a0cc 100644 --- a/.functions +++ b/.functions @@ -5,8 +5,7 @@ function md() { # Start an HTTP server from a directory, optionally specifying the port function server() { - local port="$1" - [ -z "$port" ] && port=8000 + local port="${1:-8000}" open "http://localhost:${port}/" && python -m SimpleHTTPServer "$port" } -- cgit v1.2.3