summaryrefslogtreecommitdiffstats
path: root/.shrc
diff options
context:
space:
mode:
author2024-01-29 14:32:38 +0530
committer2024-01-29 14:32:38 +0530
commitf390f01c67b92b4c4f520e8c64fc518beb235f90 (patch)
tree30cd2cf2ae4dac5a56a8342ac851539d059fb2bc /.shrc
parentInitial Commit (diff)
downloaddotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar.gz
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar.bz2
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar.lz
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar.xz
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar.zst
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.zip
Probally Should update more often
Diffstat (limited to '.shrc')
-rw-r--r--.shrc80
1 files changed, 49 insertions, 31 deletions
diff --git a/.shrc b/.shrc
index 03ece67..30aa340 100644
--- a/.shrc
+++ b/.shrc
@@ -13,47 +13,65 @@ set -o nounset
set -o noclobber
set -o ignoreeof
-PS1='$(sh-prompt $?)'
-PS2="> "
-PS3='? '
-PS4='+ '
-
-HISTSIZE=65535
-HISTFILE=/dev/null
-
-du(){
+unalias du 2> /dev/null
+du() (
set -- -k "$@"
- command du "$@"
-}
+ exec du "$@"
+)
-df(){
+unalias df 2> /dev/null
+df() (
set -- -k "$@"
- command df "$@"
-}
+ exec df "$@"
+)
-egrep() {
- set -- -E "$@"
- grep "$@"
-}
+unalias ls 2> /dev/null
+ls() (
+ set -- -Fkq "$@"
+ exec ls "$@"
+)
-fgrep() {
- set -- -F "$@"
- grep "$@"
-}
+for cmd in egrep fgrep dir vdir which
+do
+ unalias "$cmd" 2> /dev/null
+ if command -v "$cmd" > /dev/null
+ then
+ eval "$(cat <<-EOF
+ $cmd(){
+ printf "%s: %s: command is disabled.\n" \
+ "$0" "$cmd" >&2
+ return 1
+ }
+ EOF
+ )"
+ fi
+done
-ls(){
- set -- -Fk "$@"
- command ls "$@"
-}
+sudo() (
+ command sudo -nv 2> /dev/null
+ exec sudo "$@"
+)
-venvon(){
- . "${1:-venv}/bin/activate"
-}
+sudoedit() (
+ sudo -e "$@"
+)
+
+if command -v pyenv > /dev/null
+then
+ eval "$(pyenv init -)"
+fi
-if test -n ${TTY-} && test -t 0
+if command -v nodenv > /dev/null
+then
+ eval "$(nodenv init -)"
+fi
+
+if test -n "${TTY-}" && test -t 0
then
TTY=$(tty)
export TTY
- export GPG_TTY=$TTY
+ export GPG_TTY="$TTY"
fi
+PS1='$(sh-prompt $?)'
+