From 8913bcccd217e6935fff9f5ed73f4ea4a082fb05 Mon Sep 17 00:00:00 2001 From: Eduard Zintz Date: Mon, 3 Apr 2017 22:27:06 +0200 Subject: [PATCH] Use python3 for http-serve alias if available (#1193) --- modules/utility/init.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index fd7aaf6..ca547cb 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -158,7 +158,11 @@ fi # Miscellaneous # Serves a directory via HTTP. -alias http-serve='python -m SimpleHTTPServer' +if (( $+commands[python3] )); then + alias http-serve='python3 -m http.server' +else + alias http-serve='python -m SimpleHTTPServer' +fi # # Functions