chore(shell): ifdef unicode chars
This commit is contained in:
@@ -12,8 +12,12 @@ esac
|
|||||||
git_branch() {
|
git_branch() {
|
||||||
if $(git rev-parse --git-dir > /dev/null 2>&1); then
|
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/')
|
local branch_name=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
|
||||||
|
if [[ $(uname) == "OpenBSD" ]]; then
|
||||||
|
echo "(${branch_name}) "
|
||||||
|
else
|
||||||
echo "(${branch_name} ) "
|
echo "(${branch_name} ) "
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
nix_env() {
|
nix_env() {
|
||||||
@@ -32,8 +36,13 @@ __prompt_command() {
|
|||||||
local EXIT="$?"
|
local EXIT="$?"
|
||||||
export PS1="${HOST} ${DIR} ${GIT_NIX}${NEWLINE}"
|
export PS1="${HOST} ${DIR} ${GIT_NIX}${NEWLINE}"
|
||||||
|
|
||||||
|
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 red_lambda='\[\033[0;31m\]\[\033[00m\] '
|
||||||
local green_lambda='\[\033[0;32m\]\[\033[00m\] '
|
local green_lambda='\[\033[0;32m\]\[\033[00m\] '
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $EXIT != 0 ]
|
if [ $EXIT != 0 ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ alias nd="nix develop ."
|
|||||||
alias nssh='SSH_AUTH_SOCK= ssh'
|
alias nssh='SSH_AUTH_SOCK= ssh'
|
||||||
alias o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE`
|
alias o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE`
|
||||||
t(){
|
t(){
|
||||||
tmux new-session -A -s ${1:-🚀}
|
tmux new-session -A -s ${1:-dev}
|
||||||
}
|
}
|
||||||
|
|
||||||
### nmcli(1)
|
### nmcli(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user