lukesampson / pshazz

Give your powershell some pizazz.
The Unlicense
575 stars 40 forks source link

Can't make the virtualenv plugin work #120

Open arnos-stuff opened 1 year ago

arnos-stuff commented 1 year ago

Here's my terminal using a python virtualenv

image

Here's my babun config

{
    "plugins": ["git", "z", "virtualenv"],
    "prompt": [
        ["cyan", "", "{ $dir }"],
        ["green", "", " $git_branch"],
        ["", "", " $git_local_state"],
        ["", "", " $git_remote_state"],
        ["magenta", "", "[$virtualenv]"]
        ["magenta", "", " $([system.text.encoding]::utf8.getstring((194,187)))"]
    ],
    "git": {
        "prompt_unstaged": "*",
        "prompt_staged": "+",
        "prompt_stash": "$",
        "prompt_untracked": "%",
        "prompt_remote_push": ">",
        "prompt_remote_pull": "<",
        "prompt_remote_same": "="
    },
    "ignoreNativeAgent": true
}

What I want to achieve: Ideally I want the output to be like

{ jira } [ jira-py3.9 ] >> # my code
arnos-stuff commented 1 year ago

I finally somehow made it work, but I still have the ugly powershell thing in front

image

This was done using the following json config file:

{
    "plugins": ["git", "z", "virtualenv"],
    "prompt": [
        ["cyan", "", "{ $dir }"],
        ["magenta", "", " $virtualenv"],
        ["green", "", " $git_branch"],
        ["", "", " $git_local_state"],
        ["", "", " $git_remote_state"],
        ["magenta", "", " $([system.text.encoding]::utf8.getstring((194,187)))"]
    ],
    "git": {
        "prompt_unstaged": "*",
        "prompt_staged": "+",
        "prompt_stash": "$",
        "prompt_untracked": "%",
        "prompt_remote_push": ">",
        "prompt_remote_pull": "<",
        "prompt_remote_same": "="
    },
    "virtualenv": {
        "prompt_lbracket" : "(",
        "prompt_rbracket" : ")"

    },
    "ignoreNativeAgent": true
}
arnos-stuff commented 1 year ago

I finally made it disappear using this trick: set disable env display in powershell profile.

image