aboutsummaryrefslogtreecommitdiff
path: root/files/.zsh/rc/S50_functions
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2024-04-28 21:48:54 +0500
committerAnton Bobov <anton@bobov.name>2024-05-18 00:34:30 +0500
commit414e49a1d394d44b2972f30370849573b6ea093b (patch)
tree5d3833ae079f874ace59c3733e933f51c891fc20 /files/.zsh/rc/S50_functions
parentca139d29e90360333cd857cee0a82c751ad7db2d (diff)
[zsh] Updates
Diffstat (limited to 'files/.zsh/rc/S50_functions')
-rw-r--r--files/.zsh/rc/S50_functions12
1 files changed, 10 insertions, 2 deletions
diff --git a/files/.zsh/rc/S50_functions b/files/.zsh/rc/S50_functions
index b9f2a08..fe0f3b7 100644
--- a/files/.zsh/rc/S50_functions
+++ b/files/.zsh/rc/S50_functions
@@ -3,6 +3,14 @@ mcd() {
}
compdef _directories mcd
+wcc() {
+ wc -c "$@" | numfmt --to=si
+}
+
+wcl() {
+ wc -l "$@" | numfmt --grouping
+}
+
ppgrep() {
pgrep "$@" | xargs --no-run-if-empty ps fp
}
@@ -33,9 +41,9 @@ EOM
open() {
if [ $# = 0 ] ; then
- xdg-open .
+ xdg-open . >/dev/null 2>&1
else
- xdg-open $*
+ xdg-open "$@" >/dev/null 2>&1
fi
}