Zsh: Add http() function
This commit is contained in:
parent
e37c4f2a81
commit
4b5791daa0
|
@ -19,3 +19,10 @@ get_ip() {
|
||||||
|
|
||||||
eval "curl $ARGS -fsSL 'https://ifconfig.co/json$IP' $JQ"
|
eval "curl $ARGS -fsSL 'https://ifconfig.co/json$IP' $JQ"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
http() {
|
||||||
|
(( ${+commands[python]} )) || return 1
|
||||||
|
|
||||||
|
[[ $# -gt 0 ]] && local DIR="--directory $1"
|
||||||
|
eval "python -m http.server 8080 --bind 127.0.0.1 $DIR"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue