python alias
This commit is contained in:
@@ -1 +1,16 @@
|
|||||||
alias py='python3'
|
if (( $+commands[python3] )); then
|
||||||
|
alias py='python3'
|
||||||
|
fi
|
||||||
|
|
||||||
|
function pyclean() {
|
||||||
|
find "${@:-.}" -type f -name "*.py[co]" -delete
|
||||||
|
find "${@:-.}" -type d -name "__pycache__" -delete
|
||||||
|
find "${@:-.}" -depth -type d -name ".mypy_cache" -exec rm -r "{}" +
|
||||||
|
find "${@:-.}" -depth -type d -name ".pytest_cache" -exec rm -r "{}" +
|
||||||
|
}
|
||||||
|
|
||||||
|
# Grep among .py files
|
||||||
|
alias pygrep='grep -nr --include="*.py"'
|
||||||
|
|
||||||
|
# Share local directory as a HTTP server
|
||||||
|
alias pyserver="python3 -m http.server"
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ source $ZSH_POLYJUICE_PLUGINS_PATH/zsh-syntax-highlighting/zsh-syntax-highlighti
|
|||||||
source $ZSH_POLYJUICE_PLUGINS_PATH/fzf-tab/fzf-tab.plugin.zsh # relies on fzf itself and zsh-autosuggestions plugin
|
source $ZSH_POLYJUICE_PLUGINS_PATH/fzf-tab/fzf-tab.plugin.zsh # relies on fzf itself and zsh-autosuggestions plugin
|
||||||
source $ZSH_POLYJUICE_PLUGINS_PATH/ohmyzsh/plugins/fzf/fzf.plugin.zsh
|
source $ZSH_POLYJUICE_PLUGINS_PATH/ohmyzsh/plugins/fzf/fzf.plugin.zsh
|
||||||
source $ZSH_POLYJUICE_PLUGINS_PATH/ohmyzsh/plugins/zoxide/zoxide.plugin.zsh
|
source $ZSH_POLYJUICE_PLUGINS_PATH/ohmyzsh/plugins/zoxide/zoxide.plugin.zsh
|
||||||
source $ZSH_POLYJUICE_PLUGINS_PATH/ohmyzsh/plugins/python/python.plugin.zsh
|
|
||||||
|
# PYTHON_AUTO_VRUN=true
|
||||||
|
# source $ZSH_POLYJUICE_PLUGINS_PATH/ohmyzsh/plugins/python/python.plugin.zsh
|
||||||
|
|
||||||
|
|
||||||
# using starship as prompt
|
# using starship as prompt
|
||||||
|
|||||||
Reference in New Issue
Block a user