From: Jannik Zander <59698@grundfos.com> Date: Fri, 13 Jul 2018 08:11:34 +0000 (+0200) Subject: Fix hostname X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=a549c1e65e1d636d2fe338f78d4c223cee6a4c31;p=dotfiles.git Fix hostname --- diff --git a/.bash_aliases b/.bash_aliases index 6eb9052..75bac9a 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -39,6 +39,7 @@ alias info='info --vi-keys' alias ag='ag --path-to-ignore=$HOME/.ignore --skip-vcs-ignores' alias rg='rg --path-separator="//"' alias githome='git --git-dir=$HOME/.githome --work-tree=$HOME' +alias gh='githome' if [ ! -x "$(which tree 2>/dev/null)" ] then diff --git a/.bash_completion b/.bash_completion index 4c0ee7a..35786d1 100644 --- a/.bash_completion +++ b/.bash_completion @@ -1,7 +1,8 @@ # Add tab completion for `githome` by marking it as an alias for `git` -_completion_loader git +_completion_loader git 2> /dev/null if type _git &>/dev/null; then complete -o "default" -o "nospace" -F _git githome; + complete -o "default" -o "nospace" -F _git gh; fi; # Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards diff --git a/.bashrc b/.bashrc index 7c83cab..2ed6ee7 100644 --- a/.bashrc +++ b/.bashrc @@ -5,16 +5,8 @@ cd ~ +# options set -o vi - -# Set unlimited history -HISTFILESIZE= -HISTSIZE= -HISTCONTROL=ignoreboth:erasedups -HISTTIMEFORMAT="[%F %T] " -HISTFILE=~/.bash_history.local - -# Use 'help shopt' to see the documentation for the given options shopt -s autocd shopt -s cdspell shopt -s checkwinsize @@ -27,14 +19,13 @@ shopt -s histverify shopt -s no_empty_cmd_completion shopt -s nocaseglob -# Set prompt +# prompt PS1='\[\033]0;${USERNAME}@${HOSTNAME}:${PWD}\007\]' # terminal title if [[ -z "$MSYS2_PS1" ]]; then PS1="$PS1"'${debian_chroot:+($debian_chroot)}' # debian fi -PS1="$PS1"'\[\033]0;${USER}@${HOSTNAME}:${PWD}\007\]' # terminal title PS1="$PS1"'\[\033[01;32m\]' # change color PS1="$PS1"'\u@\h' # user@host PS1="$PS1"'\[\033[00m\]' # change color @@ -53,7 +44,15 @@ GIT_PS1_SHOWUPSTREAM='auto' GIT_PS1_HIDE_IF_PWD_IGNORED=1 PROMPT_COMMAND="history -a; $PROMPT_COMMAND" -# Load completion, aliases, and local settings + +# history +HISTCONTROL=ignoreboth:erasedups +HISTTIMEFORMAT="[%F %T] " +HISTFILESIZE= +HISTSIZE= +HISTFILE=~/.bash_history.local + +# completion, aliases, and local settings [ -f ~/.bash_aliases ] && . ~/.bash_aliases; [ -f ~/.bash_completion ] && . ~/.bash_completion; [ -f ~/.bashrc.local ] && . ~/.bashrc.local