summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorMehdi Sadeghi <mehdi@mehdix.org>2021-05-16 20:39:05 +0200
committerMehdi Sadeghi <mehdi@mehdix.org>2021-05-16 20:39:39 +0200
commiteb1dbbb8be24a284777dc341c59841051e68045a (patch)
treeb5ffb2d9226c2a5b7e9b5a92b77bff0c7eb99919 /.bashrc
parentca0f4b3eb74c4c632f1d547f46be5b6a57999dc0 (diff)
Add basic (posix) shell.
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc26
1 files changed, 26 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
new file mode 100644
index 0000000..f8f2fa3
--- /dev/null
+++ b/.bashrc
@@ -0,0 +1,26 @@
+PS1="[\u@\h:\W]> "
+
+if [ -z "${SSH_AGENT_PID}" ]; then
+ if ! [ -e /tmp/ssh-agent-$USER ]
+ then
+ ssh-agent 2>/dev/null >/tmp/ssh-agent-$USER
+ fi
+ . /tmp/ssh-agent-$USER >/dev/null
+fi
+
+# Aliases
+# `githome` alias is a trick to avoid having git prompt when working
+# in different directories of my home folder. I simply rename `.git`
+# folder to `.githome` and use the following alias to interact with it.
+# On new systems I only need to do the following:
+# cd ~
+# git init
+# git remote add origin git@git.sr.ht:~mehdix/dotfiles
+# or
+# git remote add origin https://git.sr.ht/~mehdix/dotfiles
+# git fetch
+# git checkout -f master
+# mv .git .githome
+alias githome='git --git-dir ~/.githome --work-tree ~'
+
+[ -f ~/.fzf.bash ] && source ~/.fzf.bash \ No newline at end of file