diff options
author | Mathias Bynens <mathias@qiwi.be> | 2011-12-31 11:49:56 +0100 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2011-12-31 11:49:56 +0100 |
commit | 42d5c26ae2f903349f39b6ec2fc0422234499310 (patch) | |
tree | 3a360e3cc728fb3a225497d8d31155e8ffd5dc52 /.functions | |
parent | 0abbaf746578ac02f0ff3e474bef20ab7552839a (diff) | |
download | dotfiles-42d5c26ae2f903349f39b6ec2fc0422234499310.tar.gz dotfiles-42d5c26ae2f903349f39b6ec2fc0422234499310.tar.bz2 dotfiles-42d5c26ae2f903349f39b6ec2fc0422234499310.zip |
`server`: Use parameter expansion instead of a fake ternary
Diffstat (limited to '.functions')
-rw-r--r-- | .functions | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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" } |