aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSukma Wardana <hey@swardana.com>2020-11-09 18:35:22 +0700
committerSukma Wardana <hey@swardana.com>2020-11-09 18:35:22 +0700
commitfe09e9588ca7957a873eb87c1c529af57890907a (patch)
treeaf99d7a52d0b320ae7619fe7a7aab944fe6b1351
parent911d279c2f6d7796feb1c1e60fd735c3ce82e623 (diff)
downloaddotfiles-fe09e9588ca7957a873eb87c1c529af57890907a.tar.gz
dotfiles-fe09e9588ca7957a873eb87c1c529af57890907a.zip
Add bash run commands and profile
Signed-off-by: Sukma Wardana <hey@swardana.com>
-rw-r--r--CHANGELOG1
-rw-r--r--bash_profile34
-rw-r--r--bashrc33
3 files changed, 68 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index df75ed9..ec2f1e8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,3 +8,4 @@ and this project adheres to https://semver.org/spec/v2.0.0.html.
[Unreleased]
- Add aliases.
+- Add bash run commands and profile.
diff --git a/bash_profile b/bash_profile
new file mode 100644
index 0000000..5e4719f
--- /dev/null
+++ b/bash_profile
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# Copyright 2020 Sukma Wardana <hey@swardana.com>
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# bash_profile will be used once, at "login" shells (eg. when login from
+# another host, or login at the text console of a local unix machine).
+#
+# Copy this file to home directory.
+# cp bash_profile ~/.bash_profile
+#
+
+# Don't put duplicate lines in history.
+HISTCONTROL=ignoredups:ignorespace
+
+if [ -f ${HOME}/.bashrc ]; then
+ source ${HOME}/.bashrc
+fi
diff --git a/bashrc b/bashrc
new file mode 100644
index 0000000..e041adc
--- /dev/null
+++ b/bashrc
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# Copyright 2020 Sukma Wardana <hey@swardana.com>
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# bashrc used every time an interactive and non-login shell (eg. when opening
+# new terminal window (xterm), Konsole (KDE), etc.).
+# Thus, bashrc should be as lightweight (minimal) as possible to reduce the
+# overhead when starting a non-login shell.
+#
+# Copy this file to home directory.
+# cp bashrc ~/.bashrc
+#
+
+if [ -f ${HOME}/.aliases ]; then
+ source ${HOME}/.aliases
+fi