Commit f46794a

xxwhirlpool  ·  2025-12-10 17:11:52 -0500 EST
parent 37bb527
add askdd to (hopefully) protect from disk destruction 2.0 & more
3 files changed,  +18, -3
+5, -1
......@@ -133,7 +133,8 @@ alias fastfetch="hyfetch"
133133 alias bat="batcat"
134134 alias cat="bat --paging=never"
135135 alias rced="micro ~/.bashrc && source ~/.bashrc"
136-alias dd="ask dd"
136+alias dd="askdd"
137+alias copy="xclip -sel clipboard"
137138
138139 # lazy ass way for me to get my idol mp3s from youtube
139140 # usage: ytmp3 url
......@@ -153,6 +154,9 @@ alias sun="daylight --short --timezone='America/New_York' | lolcat"
153154 # git
154155 alias gitall="git remote | xargs -L1 git push --all"
155156 alias gyolo="git add . && git commit -m 'yolo'"
157+alias gitd="git diff --staged"
158+alias gdiff="gitd"
159+alias gits="git status"
156160 alias pusheu="git push bytes main && cd /home/kat/Documents/Git/-mine/eunoia-astro/src/utils && node git-changelog.js"
157161
158162 # vpn split tunnel aliases based on a small script @ ~/.local/bin/mvpn
+1, -2
......@@ -1,7 +1,6 @@
11 #!/usr/bin/env bash
22 #
3-# mostly to stop myself from accidentally
4-# wiping my own hard drive again with `dd`
3+# basic confirmation dialog
54
65 if [ $# -eq 0 ]; then
76 echo "Usage: ask [COMMAND]"
+12, -0
......@@ -0,0 +1,12 @@
1+#!/usr/bin/env bash
2+
3+warning() {
4+ if [[ "$*" =~ $(df . | awk {'print $1'} | tail -n1) ]]; then
5+ if ! gum confirm "WARNING: you are executing this command on your current drive! be careful!" --default="false" --timeout="15s"; then
6+ echo "nope"
7+ exit 1
8+ fi
9+ fi
10+}
11+
12+warning $@