Skip to content

Commit

Permalink
bashrc: update
Browse files Browse the repository at this point in the history
  • Loading branch information
vitek committed May 7, 2022
1 parent d60b98c commit bfb2841
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
22 changes: 22 additions & 0 deletions bash.d/90-completion.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- mode: shell-script; -*-

if [ "$TERM" == "dumb" -o "$TERM" == "tramp" ]; then
return
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
elif [ -f /usr/local/etc/bash_completion ]; then # FreeBSD case
. /usr/local/etc/bash_completion

if [ -f /usr/local/share/git-core/contrib/completion/git-completion.bash ]; then
. /usr/local/share/git-core/contrib/completion/git-completion.bash
fi
fi
fi

shopt -s direxpand
5 changes: 5 additions & 0 deletions bash.d/99-ps1.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# -*- mode: shell-script; -*-

if [ "$TERM" == "dumb" -o "$TERM" == "tramp" ]; then
PS1='$ '
return
fi

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
Expand Down
17 changes: 0 additions & 17 deletions bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,6 @@ if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
elif [ -f /usr/local/etc/bash_completion ]; then # FreeBSD case
. /usr/local/etc/bash_completion

if [ -f /usr/local/share/git-core/contrib/completion/git-completion.bash ]; then
. /usr/local/share/git-core/contrib/completion/git-completion.bash
fi
fi
fi

shopt -s direxpand

# Nice editor for small configs and commit messages
export EDITOR=vim
export PAGER=less
Expand Down

0 comments on commit bfb2841

Please sign in to comment.