From ca6b934c805bca32731068849c0045f5e0b2152c Mon Sep 17 00:00:00 2001 From: The Cobra Date: Wed, 2 Mar 2022 10:58:27 -0500 Subject: [PATCH] Fix prompt startup bug and update bashrc --- .bashrc | 28 +++++++++++++++++++++++++--- .profile | 1 + .prompt | 48 +++++++++++++++++++++++++++--------------------- 3 files changed, 53 insertions(+), 24 deletions(-) diff --git a/.bashrc b/.bashrc index 5af58f2..d98e0ab 100644 --- a/.bashrc +++ b/.bashrc @@ -1,6 +1,13 @@ . ~/.prompt +# History stuff +export HISTCONTROL=ignoredups:erasedups +export HISTFILESIZE=1000 +export HISTSIZE=1000 + +# We hate sudo here alias sudo='sh -c "exit 1"' +# Other aliases alias c='clear' alias ls='ls --color=auto -FAh' alias ll='ls -l' @@ -8,20 +15,35 @@ alias rebash='. ~/.bashrc' alias bashrc="$EDITOR ~/.bashrc && rebash" alias nf='neofetch' alias sshd='boas /usr/sbin/sshd' + +# Completions for elevation program (https://codeberg.org/Bowuigi/Unit21 in management/boas) +complete -cf boas + +# Random string (passwords) +randstr() { tr -cd [:graph:] (wl-copy) } +# Source colors for tty . ~/.config/sxmo/isotope.dark -lip() { ip a| grep wlan0 | sed 1d | cut -d' ' -f6 | cut -d/ -f1; } + +# Get local IP +lip() { ip a | grep ${1:-wlan0} | sed 1d | cut -d' ' -f6 | cut -d/ -f1; } + +# URL-encode stdin urlencode() { - old_lc_collate=$LC_COLLATE + LC_COLLATE_OLD=$LC_COLLATE LC_COLLATE=C local TEXT="$(