Poetry uses virtualenv. This means, if you change the prompt prefix of the virtualenv, you change the poetry prefix.
1) Find the path of your virtualenv:
# in the directory where you use poetry
$ poetry env info
Virtualenv
Python: 3.10.4
Implementation: CPython
Path: /Users/myuser/Library/Caches/pypoetry/virtualenvs/my-env-SQabEQie-py3.10
Valid: True
2) Change the prompt prefix of the virtualenv
(These instructions are directly taken from here)
# cd to the path of the virtualenv
$ cd /Users/myuser/Library/Caches/pypoetry/virtualenvs/my-env-SQabEQie-py3.10
# open the file bin/activate in an editor
$ nano bin/activate
Modify the following lines to change the prefix:
...
else
PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
fi
...
For example, if you want to have a static prefix '(ptr)' change it to
...
else
PS1="(ptr) ${PS1-}"
fi
...