summaryrefslogtreecommitdiff
path: root/home/xyz
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-08-19 22:11:25 -0700
committerxyz <gky44px1999@gmail.com>2022-08-19 22:11:25 -0700
commit62460a5cccfb4e1fa62a6b0fbd7e8403b9a8502a (patch)
treec22b24422cc65ce97aa9e34794b58dd971241102 /home/xyz
parente798cc4087bc3e20061d3fdb84bf77f8274ae35e (diff)
new px script
Diffstat (limited to 'home/xyz')
-rw-r--r--home/xyz/.bashrc1
-rwxr-xr-xhome/xyz/.local/bin/px10
2 files changed, 10 insertions, 1 deletions
diff --git a/home/xyz/.bashrc b/home/xyz/.bashrc
index 484350c3..83d48bcf 100644
--- a/home/xyz/.bashrc
+++ b/home/xyz/.bashrc
@@ -75,7 +75,6 @@ alias m=man
alias p=pacman
alias pt=pactree
alias pu=paru
-alias px='printf %s "$(pwd)" | xsel -ib'
alias qre='qrencode -t utf8i -m 1'
alias r='rem -c+2 -@'
# https://askubuntu.com/a/22043
diff --git a/home/xyz/.local/bin/px b/home/xyz/.local/bin/px
new file mode 100755
index 00000000..7d5c17d2
--- /dev/null
+++ b/home/xyz/.local/bin/px
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Printf Xsel
+
+if [ $# -eq 0 ]; then
+ printf '%s' "$PWD"
+else
+ for dir; do
+ /usr/bin/printf '%q ' "$(realpath -- "$dir")"
+ done
+fi | xsel -ib