logoalt Hacker News

pdntspalast Thursday at 4:05 PM7 repliesview on HN

Then can they please figure out some way of invoking it that doesnt require prefixing everything with 'uv'


Replies

maleldillast Thursday at 4:41 PM

You can source the virtualenv like normal.

ghshephardyesterday at 11:06 PM

Solved with direnv. Also - in my .bashrc in all of my (many) clients:

  $ type uvi uvl uvv
  uvi is a function
  uvi ()
  {
      uv pip install $@
  }
  uvl is a function
  uvl ()
  {
      uv pip list
  }
  uvv is a function
  uvv ()
  {
      uv venv;
      cat > .envrc <<EOF
  source .venv/bin/activate
  EOF

      direnv allow
  }
duskdozertoday at 12:52 PM

That would defeat the purpose of creating and expanding their brand.

arw0nlast Thursday at 6:57 PM

For any command, you can create an 'alias' in your shell config. That way you can get rid of the prefix.

tomrodlast Thursday at 4:23 PM

alias in ~/.zshrc?

malcolmgreaveslast Thursday at 4:30 PM

uv run bash/zsh/your shell of choice