summaryrefslogtreecommitdiff
path: root/dotfiles/.bashrc
diff options
context:
space:
mode:
authorDavid Thompson <davet@gnu.org>2015-05-23 20:23:05 -0400
committerDavid Thompson <davet@gnu.org>2015-05-23 20:24:47 -0400
commit606ec63191f54758ee5da58caa0677b21f9d03ac (patch)
tree2bc16eed13a1557f5fda98d11647a64bec728db6 /dotfiles/.bashrc
parentad958deae84396c05656f5bf834ef072dbb0c0fe (diff)
bash: Update .bashrc and .bash_profile.
Diffstat (limited to 'dotfiles/.bashrc')
-rw-r--r--dotfiles/.bashrc28
1 files changed, 22 insertions, 6 deletions
diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc
index 7112468..8e0622e 100644
--- a/dotfiles/.bashrc
+++ b/dotfiles/.bashrc
@@ -1,19 +1,31 @@
# -*- shell-script -*-
+# Bash initialization for interactive non-login shells and
+# for remote shells (info "(bash) Bash Startup Files").
-# If not running interactively, don't do anything
-[[ $- != *i* ]] && return
+# Export 'SHELL' to child processes. Programs such as 'screen'
+# honor it and otherwise use /bin/sh.
+export SHELL
-# append to the history file, don't overwrite it
+if [ -n "$SSH_CLIENT" -a -z "`type -P cat`" ]
+then
+ # We are being invoked from a non-interactive SSH session
+ # (as in "ssh host command") but 'cat' cannot be found
+ # in $PATH. Source /etc/profile so we get $PATH and other
+ # essential variables.
+ source /etc/profile
+fi
+
+# Append to the history file, don't overwrite it
shopt -s histappend
-# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+# For setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
-# don't put duplicate lines or lines starting with space in the history.
+# Don't put duplicate lines or lines starting with space in the history.
HISTCONTROL=ignoreboth
-# check the window size after each command and, if necessary,
+# Check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
@@ -21,5 +33,9 @@ shopt -s checkwinsize
# files and zero or more directories and subdirectories.
shopt -s globstar
+PS1='\u@\h \w\$ '
+alias ls='ls -p --color'
+alias ll='ls -l'
+
# Alias for development guix
alias guix="$HOME/Code/guix/pre-inst-env guix"