aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2025-02-16 15:09:34 +0000
committerJustine Smithies <justine@smithies.me.uk>2025-02-16 15:09:34 +0000
commitc1537b0cf54ab978a4d5920a2ca619d18b1e2c44 (patch)
tree1286dd8f07985501bf58304d9e887fbcb795a644
parent08c6bf3af721dd0df948f592506777a866249cea (diff)
Fixed indetation and trailing spaces in .kshrc
-rw-r--r--.kshrc22
1 files changed, 10 insertions, 12 deletions
diff --git a/.kshrc b/.kshrc
index 47d903d..5fade12 100644
--- a/.kshrc
+++ b/.kshrc
@@ -1,6 +1,6 @@
#
# .kshrc - oksh - Public domain Korn shell startup file
-#
+#
# See also oksh(1)
# Don't do anything if we don't have a prompt (not an interactive shell)
@@ -11,14 +11,14 @@ set -o ignoreeof
# Export all
set -o allexport
-
+
# Setup history
HISTFILE=$HOME/.ksh_history
HISTSIZE=10000
HISTCONTROL=ignoredups:ignorespace
# Some useful aliases
-# If btop is installed then alias top to btop
+# If btop is installed then alias top to btop
[ -e /usr/local/bin/btop ] && alias top="/usr/local/bin/btop"
alias ls='ls --color=auto -hv'
alias config='/usr/local/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
@@ -28,20 +28,18 @@ alias wanip='dig @resolver4.opendns.com myip.opendns.com +short'
# Alias to stop foot terminal confusing ssh
if [ "$TERM" = "foot" ]; then
- alias ssh='TERM=linux ssh'
+ alias ssh='TERM=linux ssh'
fi
# Simple, lightweight git prompt for oksh: if inside a git repo, adds the
# branch name to PS1.
__get_current_git_branch_name() {
-
- branch_name="$(git rev-parse --abbrev-ref HEAD 2>/dev/null)" && \
- [ -n "$branch_name" ] && \
-
- echo -en " $branch_name"
+ branch_name="$(git rev-parse --abbrev-ref HEAD 2>/dev/null)" && \
+ [ -n "$branch_name" ] && \
+ echo -en " $branch_name"
}
-# Set prompt: ``username@hostname directory $ ''
+# Set prompt: ``username@hostname directory $ ''
PS1="\[\e[1;32m\]\u@\h \[\e[1;34m\]\w\[\e[0m\] \[\e[1;31m\]\$(__get_current_git_branch_name)\[\e[0m\] $ "
COLORTERM="truecolor"
@@ -70,10 +68,10 @@ GPG_TTY=$(tty)
# Enable the use of ssh-agent
pkill -f ssh-agent
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
- ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
+ ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [ ! -f "$SSH_AUTH_SOCK" ]; then
- . "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
+ . "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
fi
# Completions