aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-10-28 18:22:15 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-10-28 18:22:15 +0300
commitb88cf85adc0be578073894ce0f49051008707cb0 (patch)
treee727ce03dabe22ed181a5d01ebc18943858a580e
parentbugfix (diff)
downloadlinux-home-b88cf85adc0be578073894ce0f49051008707cb0.tar.gz
linux-home-b88cf85adc0be578073894ce0f49051008707cb0.zip
remove more dead code from bash dotfiles
Diffstat (limited to '')
-rw-r--r--%HOME%/.bash_profile53
-rw-r--r--%HOME%/.bashrc36
-rw-r--r--%HOME%/.inputrc41
-rw-r--r--%HOME%/.profile41
4 files changed, 15 insertions, 156 deletions
diff --git a/%HOME%/.bash_profile b/%HOME%/.bash_profile
index 4af56b1..b545321 100644
--- a/%HOME%/.bash_profile
+++ b/%HOME%/.bash_profile
@@ -1,56 +1,13 @@
-# To the extent possible under law, the author(s) have dedicated all
-# copyright and related and neighboring rights to this software to the
-# public domain worldwide. This software is distributed without any warranty.
-# You should have received a copy of the CC0 Public Domain Dedication along
-# with this software.
-# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
-
-# base-files version 4.2-4
-
-# ~/.bash_profile: executed by bash(1) for login shells.
-
-# The latest version as installed by the Cygwin Setup program can
-# always be found at /etc/defaults/etc/skel/.bash_profile
-
-# Modifying /etc/skel/.bash_profile directly will prevent
-# setup from updating it.
-
-# The copy in your home directory (~/.bash_profile) is yours, please
-# feel free to customise it to create a shell
-# environment to your liking. If you feel a change
-# would be benifitial to all, please feel free to send
-# a patch to the cygwin mailing list.
-
-# User dependent .bash_profile file
-
-# source the users bashrc if it exists
-if [ -f "${HOME}/.bashrc" ] ; then
- source "${HOME}/.bashrc"
-fi
-
-# Set PATH so it includes user's private bin if it exists
-# if [ -d "${HOME}/bin" ] ; then
-# PATH="${HOME}/bin:${PATH}"
-# fi
-
-# Set MANPATH so it includes users' private man if it exists
-# if [ -d "${HOME}/man" ]; then
-# MANPATH="${HOME}/man:${MANPATH}"
-# fi
-
-# Set INFOPATH so it includes users' private info if it exists
-# if [ -d "${HOME}/info" ]; then
-# INFOPATH="${HOME}/info:${INFOPATH}"
-# fi
+[ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc"
echo "Welcome to $( hostname )"
spawn_ssh_agent() {
- [ -n "${SSH_AGENT_PID:+x}" ] && return 0
+ [ -n "${SSH_AGENT_PID:+x}" ] && return 0
- eval "$( ssh-agent -s )" > /dev/null \
- && trap "$( printf 'kill %q' "$SSH_AGENT_PID" )" 0 \
- && ssh-add &> /dev/null
+ eval "$( ssh-agent -s )" > /dev/null \
+ && trap "$( printf 'kill %q' "$SSH_AGENT_PID" )" 0 \
+ && ssh-add &> /dev/null
}
[ "$( uname -o )" == 'Cygwin' ] && spawn_ssh_agent
diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc
index 9aea508..7ef4910 100644
--- a/%HOME%/.bashrc
+++ b/%HOME%/.bashrc
@@ -1,35 +1,7 @@
-[[ "$-" != *i* ]] && return
-
-# Completion options
-#
-# These completion tuning parameters change the default behavior of bash_completion:
-#
-# Define to access remotely checked-out files over passwordless ssh for CVS
-# COMP_CVS_REMOTE=1
-#
-# Define to avoid stripping description in --option=description of './configure --help'
-# COMP_CONFIGURE_HINTS=1
-#
-# Define to avoid flattening internal contents of tar files
-# COMP_TAR_INTERNAL_PATHS=1
-#
-# Uncomment to turn on programmable completion enhancements.
-# Any completions you add in ~/.bash_completion are sourced last.
-# [[ -f /etc/bash_completion ]] && . /etc/bash_completion
-
-# History Options
-#
-# Don't put duplicate lines in the history.
-# export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
-#
-# Ignore some controlling instructions
-# HISTIGNORE is a colon-delimited list of patterns which should be excluded.
-# The '&' is a special pattern which suppresses duplicate entries.
-# export HISTIGNORE=$'[ \t]*:&:[fb]g:exit'
-# export HISTIGNORE=$'[ \t]*:&:[fb]g:exit:ls' # Ignore the ls command as well
-#
-# Whenever displaying the prompt, write the previous line to disk
-# export PROMPT_COMMAND="history -a"
+case "$-" in
+ *i*) ;;
+ *) return ;;
+esac
PS1='\[\e[33m\]\W\[\e[0m\]: '
diff --git a/%HOME%/.inputrc b/%HOME%/.inputrc
index cd471e8..8f74bc3 100644
--- a/%HOME%/.inputrc
+++ b/%HOME%/.inputrc
@@ -1,26 +1,3 @@
-# To the extent possible under law, the author(s) have dedicated all
-# copyright and related and neighboring rights to this software to the
-# public domain worldwide. This software is distributed without any warranty.
-# You should have received a copy of the CC0 Public Domain Dedication along
-# with this software.
-# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
-
-# base-files version 4.2-4
-
-# ~/.inputrc: readline initialization file.
-
-# The latest version as installed by the Cygwin Setup program can
-# always be found at /etc/defaults/etc/skel/.inputrc
-
-# Modifying /etc/skel/.inputrc directly will prevent
-# setup from updating it.
-
-# The copy in your home directory (~/.inputrc) is yours, please
-# feel free to customise it to create a shell
-# environment to your liking. If you feel a change
-# would be benifitial to all, please feel free to send
-# a patch to the cygwin mailing list.
-
# the following line is actually
# equivalent to "\C-?": delete-char
"\e[3~": delete-char
@@ -47,30 +24,14 @@
#set input-meta on
#set output-meta on
$if Bash
- # Don't ring bell on completion
- set bell-style none
-
- # or, don't beep at me - show me
+ #set bell-style none
set bell-style visible
-
- # Filename completion/expansion
set completion-ignore-case on
set show-all-if-ambiguous on
-
- # Expand homedir name
set expand-tilde on
-
- # Append "/" to all dirnames
set mark-directories on
set mark-symlinked-directories on
-
- # Match all files
set match-hidden-files on
-
- # 'Magic Space'
- # Insert a space character then performs
- # a history expansion in the line
#Space: magic-space
-
TAB: menu-complete
$endif
diff --git a/%HOME%/.profile b/%HOME%/.profile
index 6b44625..056d9db 100644
--- a/%HOME%/.profile
+++ b/%HOME%/.profile
@@ -1,37 +1,6 @@
-# To the extent possible under law, the author(s) have dedicated all
-# copyright and related and neighboring rights to this software to the
-# public domain worldwide. This software is distributed without any warranty.
-# You should have received a copy of the CC0 Public Domain Dedication along
-# with this software.
-# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
+LANG="$( locale --no-unicode --utf )"
+export LANG
-# base-files version 4.2-4
-
-# ~/.profile: executed by the command interpreter for login shells.
-
-# The latest version as installed by the Cygwin Setup program can
-# always be found at /etc/defaults/etc/skel/.profile
-
-# Modifying /etc/skel/.profile directly will prevent
-# setup from updating it.
-
-# The copy in your home directory (~/.profile) is yours, please
-# feel free to customise it to create a shell
-# environment to your liking. If you feel a change
-# would be benificial to all, please feel free to send
-# a patch to the cygwin mailing list.
-
-# User dependent .profile file
-
-# Set user-defined locale
-export LANG=$(locale -uU)
-
-# This file is not read by bash(1) if ~/.bash_profile or ~/.bash_login
-# exists.
-#
-# if running bash
-if [ -n "${BASH_VERSION}" ]; then
- if [ -f "${HOME}/.bashrc" ]; then
- source "${HOME}/.bashrc"
- fi
-fi
+[ -n "${BASH_VERSION+x}" ] \
+ && [ -f "$HOME/.bashrc" ] \
+ && source "$HOME/.bashrc"