diff --git a/roles/home-cli/files/bash_profile b/roles/home-cli/files/bash_profile index ef1ed0f..50941b8 100644 --- a/roles/home-cli/files/bash_profile +++ b/roles/home-cli/files/bash_profile @@ -9,7 +9,6 @@ export LANG=C export PAGER=less export PAPERSIZE=a4 export POWERSHELL_TELEMETRY_OPTOUT=1 -export PS1="${PS1:-\$\ }" export PYTHONWARNINGS=ignore::UserWarning # Set up XDG variables. See: @@ -75,7 +74,10 @@ then bind 'set bell-style none' bind 'set completion-ignore-case on' bind 'set enable-bracketed-paste off' - export PS1="\[\033[01m\]\u@\h\\$\[\033[00m\] " + PS1="\[\033[01m\]\u@\h\\$\[\033[00m\] " +elif [ -n "$ZSH_VERSION" ] +then + PS1="%B%n@%m%#%b " fi _acp_add_path () { diff --git a/roles/home-cli/files/zprofile b/roles/home-cli/files/zprofile new file mode 100644 index 0000000..0f94ce9 --- /dev/null +++ b/roles/home-cli/files/zprofile @@ -0,0 +1,2 @@ +#!/bin/zsh +emulate sh -c '. "$HOME/.bash_profile"' diff --git a/roles/home-cli/tasks/shell.yml b/roles/home-cli/tasks/shell.yml index 722f1a9..941fc11 100644 --- a/roles/home-cli/tasks/shell.yml +++ b/roles/home-cli/tasks/shell.yml @@ -21,3 +21,7 @@ ansible.builtin.copy: src: bashrc dest: "{{ ansible_env.HOME }}/.bashrc" +- name: Create $HOME/.zprofile + ansible.builtin.copy: + src: zprofile + dest: "{{ ansible_env.HOME }}/.zprofile"