mirror of
https://github.com/Ascyii/dotfiles.git
synced 2026-01-01 15:04:24 -05:00
Custom fish function and bash yazi with fisher
This commit is contained in:
15
cli/dot-config/fish/functions/serve.fish
Normal file
15
cli/dot-config/fish/functions/serve.fish
Normal file
@@ -0,0 +1,15 @@
|
||||
function serve --description "Start a simple HTTP server"
|
||||
set port 8000
|
||||
if test (count $argv) -gt 0
|
||||
set port $argv[1]
|
||||
end
|
||||
|
||||
if command -v python3 >/dev/null
|
||||
python3 -m http.server $port
|
||||
else if command -v python >/dev/null
|
||||
python -m SimpleHTTPServer $port
|
||||
else
|
||||
echo "Python not found"
|
||||
return 1
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user