aboutsummaryrefslogtreecommitdiffstats
path: root/.functions
diff options
context:
space:
mode:
Diffstat (limited to '.functions')
-rw-r--r--.functions3
1 files changed, 1 insertions, 2 deletions
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"
}