2023-02-23 13:30:07 +00:00
|
|
|
poetry_installed()
|
2023-02-09 16:26:31 +00:00
|
|
|
{
|
2023-02-23 13:30:07 +00:00
|
|
|
command -v poetry > /dev/null 2>&1 && return 0 || echo "Poetry not installed"
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
poetry_env_exists()
|
|
|
|
{
|
|
|
|
poetry_installed && {
|
|
|
|
poetry env info > /dev/null 2>&1 && return 0\
|
|
|
|
|| echo "No poetry environment configured for $(pwd)"
|
|
|
|
}
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
penv()
|
|
|
|
{
|
|
|
|
poetry_env_exists && source "$(poetry env info --path)/bin/activate" || return 1
|
|
|
|
}
|
|
|
|
pshell()
|
|
|
|
{
|
|
|
|
poetry_env_exists && poetry shell || return 1
|
|
|
|
}
|
|
|
|
prun()
|
|
|
|
{
|
|
|
|
poetry_env_exists && poetry run $@ || return 1
|
2023-02-09 16:26:31 +00:00
|
|
|
}
|
|
|
|
|
2023-02-23 13:30:07 +00:00
|
|
|
alias vim="nvim"
|
|
|
|
alias vimdiff="nvim -d"
|
2023-01-25 18:37:11 +00:00
|
|
|
alias nvimdiff="nvim -d"
|
2023-01-12 11:56:06 +00:00
|
|
|
alias lg="lazygit"
|