From b020a4a7d7e037f2b0954498aff6faab9ec328b7 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Sat, 15 Aug 2020 18:36:17 +0200 Subject: [PATCH] Remove unnused options --- .bashrc | 21 +++++++-------------- .profile | 21 --------------------- 2 files changed, 7 insertions(+), 35 deletions(-) diff --git a/.bashrc b/.bashrc index 0fbd61c..36c3928 100644 --- a/.bashrc +++ b/.bashrc @@ -11,13 +11,13 @@ esac # See bash(1) for more options HISTCONTROL=ignoreboth -# append to the history file, don't overwrite it -shopt -s histappend - # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 +# append to the history file, don't overwrite it +shopt -s histappend + # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize @@ -95,15 +95,8 @@ 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 /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi -fi - -# enable extra completion scripts -if [ -f /etc/bash_completion ]; then - . /etc/bash_completion +if [ -f /usr/share/bash-completion/bash_completion ]; then +. /usr/share/bash-completion/bash_completion +elif [ -f /etc/bash_completion ]; then +. /etc/bash_completion fi diff --git a/.profile b/.profile index 460b370..e26c2ea 100644 --- a/.profile +++ b/.profile @@ -5,7 +5,6 @@ export PAGER=less export BROWSER=/usr/bin/firefox CONTAINER_OR_VM=false -SSH_ENV="$HOME/.ssh/environment" if [ -z "$(which systemd-detect-virt)" ] || [ "$(systemd-detect-virt)" != "none" ]; then CONTAINER_OR_VM=true @@ -13,26 +12,6 @@ fi export CONTAINER_OR_VM -if [ ! -f $SSH_ENV ]; then - mkdir $HOME/.ssh && touch $HOME/.ssh/environment -fi - -function start_agent { - /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" - chmod 600 "${SSH_ENV}" - . "${SSH_ENV}" > /dev/null -} - -# source SSH settings, if applicable -if [ -f "${SSH_ENV}" ]; then - . "${SSH_ENV}" > /dev/null - ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { - start_agent; - } -else - start_agent; -fi - # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists