From 8d452a51fdaea50f014a96e77d99a748c5d98a26 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Mon, 19 Feb 2024 19:18:48 +0100 Subject: [PATCH] chore(shell): ifdef unicode chars --- files/shell/.bashrc | 15 ++++++++++++--- files/shell/.shellrc.alias | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/files/shell/.bashrc b/files/shell/.bashrc index da7d4b0..00b4b77 100644 --- a/files/shell/.bashrc +++ b/files/shell/.bashrc @@ -12,7 +12,11 @@ esac git_branch() { if $(git rev-parse --git-dir > /dev/null 2>&1); then local branch_name=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') - echo "(${branch_name} ) " + if [[ $(uname) == "OpenBSD" ]]; then + echo "(${branch_name}) " + else + echo "(${branch_name} ) " + fi fi } @@ -32,8 +36,13 @@ __prompt_command() { local EXIT="$?" export PS1="${HOST} ${DIR} ${GIT_NIX}${NEWLINE}" - local red_lambda='\[\033[0;31m\]󱞩\[\033[00m\] ' - local green_lambda='\[\033[0;32m\]󱞩\[\033[00m\] ' + if [[ $(uname) == "OpenBSD" ]]; then + local red_lambda='\[\033[0;31m\]>\[\033[00m\] ' + local green_lambda='\[\033[0;32m\]>\[\033[00m\] ' + else + local red_lambda='\[\033[0;31m\]󱞩\[\033[00m\] ' + local green_lambda='\[\033[0;32m\]󱞩\[\033[00m\] ' + fi if [ $EXIT != 0 ] then diff --git a/files/shell/.shellrc.alias b/files/shell/.shellrc.alias index 1d77be5..f0773d4 100644 --- a/files/shell/.shellrc.alias +++ b/files/shell/.shellrc.alias @@ -20,8 +20,8 @@ alias l='eza --icons' alias nd="nix develop ." alias nssh='SSH_AUTH_SOCK= ssh' alias o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE` -t(){ - tmux new-session -A -s ${1:-🚀} +t(){ + tmux new-session -A -s ${1:-dev} } ### nmcli(1)