summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bash_login1
-rw-r--r--bash_logout3
-rw-r--r--bashrc76
-rw-r--r--docs/bash.org4
-rw-r--r--emacs.d/modes/lang-scala.el2
-rw-r--r--env9
6 files changed, 94 insertions, 1 deletions
diff --git a/bash_login b/bash_login
new file mode 100644
index 0000000..4b18bd1
--- /dev/null
+++ b/bash_login
@@ -0,0 +1 @@
+source $HOME/.bashrc
diff --git a/bash_logout b/bash_logout
new file mode 100644
index 0000000..3aa4f01
--- /dev/null
+++ b/bash_logout
@@ -0,0 +1,3 @@
+sudo -k
+clear
+
diff --git a/bashrc b/bashrc
new file mode 100644
index 0000000..224d286
--- /dev/null
+++ b/bashrc
@@ -0,0 +1,76 @@
+export EDITOR="emacsclient -a ''"
+export HISTFILE=
+export LANG="en_US.UTF-8"
+export LC_ALL="$LANG"
+export LC_CTYPE="$LANG"
+export PAGER="less"
+export TMPDIR="${HOME}/tmp"
+export TZ=America/Los_Angeles
+export GOPATH="${HOME}"
+
+export PATH="${HOME}/bin:${HOME}/src/bin:/opt/twitter/bin:~/src/source/dist:/opt/twitter/opt/go/libexec/bin:${PATH}"
+
+[ -z "$PS1" ] && return
+
+# prompts
+export PS1="\W % "
+
+# limits
+ulimit -S -c 0
+
+# Set up ssh-agent
+SSH_ENV="$HOME/.ssh/environment"
+
+function start_agent {
+  if [[ -f "${HOME}/.ssh/id_rsa" ]]; then
+    echo "Initializing new GPG agent..."
+    touch $SSH_ENV
+    chmod 600 "${SSH_ENV}"
+    /usr/bin/ssh-agent | sed 's/^echo/#echo/' >> "${SSH_ENV}"
+    . "${SSH_ENV}" > /dev/null
+    /usr/bin/ssh-add
+  fi
+}
+
+# Source SSH settings, if applicable
+if [ -f "${SSH_ENV}" ]; then
+  . "${SSH_ENV}" > /dev/null
+  kill -0 $SSH_AGENT_PID 2>/dev/null || {
+    start_agent
+  }
+else
+  start_agent
+fi
+
+# some aliases
+if [[ "${OSTYPE}" =~ "darwin" ]]; then
+  alias ls='ls -G'
+else
+  alias ls='ls --color'
+fi
+
+# editor
+alias e="$EDITOR"
+alias et="TERM=xterm-256color emacsclient -nw"
+
+# generic commands
+alias cp="cp -i"
+alias l="ls"
+alias la="ls -a"
+alias ll="ls -lh"
+alias lt="ls -lhtr"
+alias mv="mv -i"
+alias rm="rm -i"
+
+# tools
+alias gerp="grep --color=auto"
+alias grep="grep --color=auto"
+alias pjson="python -mjson.tool"
+
+# git
+alias g="git"
+alias gclean="git clean -dfx"
+alias gst="git status"
+
+# local stuff
+[ -f "${HOME}/.bash_local" ] && source "${HOME}/.bash_local"
diff --git a/docs/bash.org b/docs/bash.org
new file mode 100644
index 0000000..2e2154a
--- /dev/null
+++ b/docs/bash.org
@@ -0,0 +1,4 @@
+#+AUTHOR: Franck Cuny
+#+TITLE: bash documentation
+#+STARTUP: indent
+#+STARTUP: hidestars
diff --git a/emacs.d/modes/lang-scala.el b/emacs.d/modes/lang-scala.el
index d75b237..6dde62d 100644
--- a/emacs.d/modes/lang-scala.el
+++ b/emacs.d/modes/lang-scala.el
@@ -1,4 +1,4 @@
-(use-package scala-mode2
+(use-package scala-mode
   :ensure t)
 
 (use-package ensime
diff --git a/env b/env
new file mode 100644
index 0000000..c840045
--- /dev/null
+++ b/env
@@ -0,0 +1,9 @@
+export EDITOR="emacsclient -a ''"
+export HISTFILE=
+export LANG="en_US.UTF-8"
+export LC_ALL="$LANG"
+export LC_CTYPE="$LANG"
+export PAGER="less"
+export TMPDIR="${HOME}/tmp"
+export TZ=America/Los_Angeles
+export GOPATH="${HOME}"