Fix venv prompt
This commit is contained in:
parent
1554e4d8fb
commit
bb74a6de38
|
@ -84,6 +84,15 @@ pkgs: {
|
|||
echo -n (set_color --bold red) (pwd) (set_color normal)
|
||||
end
|
||||
|
||||
function __venv
|
||||
function __prompt_name
|
||||
cat $VIRTUAL_ENV/pyvenv.cfg | head -n4 | tail -n 1 | cut -b 11- | head -c -2
|
||||
end
|
||||
if [ $VIRTUAL_ENV ]
|
||||
echo -n (set_color white) '['(__prompt_name)']' (set_color normal)
|
||||
end
|
||||
end
|
||||
|
||||
function _git_branch_name
|
||||
echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||')
|
||||
end
|
||||
|
@ -117,6 +126,7 @@ pkgs: {
|
|||
echo -n (set_color white)"╭─"(set_color normal)
|
||||
__user_host
|
||||
__current_path
|
||||
__venv
|
||||
__git_status
|
||||
echo -e '''
|
||||
echo (set_color white)"╰─"(set_color --bold white)"\$ "(set_color normal)
|
||||
|
|
|
@ -3,6 +3,9 @@ pkgs: {
|
|||
font.name = "Comic Mono";
|
||||
font.package = pkgs.comic-mono;
|
||||
font.size = 13;
|
||||
environment = {
|
||||
VIRTUAL_ENV_DISABLE_PROMPT = "true";
|
||||
};
|
||||
settings = {
|
||||
hide_window_decorations = true;
|
||||
tab_bar_style = "powerline";
|
||||
|
|
Loading…
Reference in a new issue