From 30155bc59f9f6196c2526a89e9af5fd1c9e8c060 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 2 Feb 2025 09:00:28 +0200 Subject: fix(bash): Quote all unquoted $@ --- .bashrc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.bashrc b/.bashrc index d52ef93..67adc2f 100644 --- a/.bashrc +++ b/.bashrc @@ -90,7 +90,7 @@ export PROMPT_COMMAND="shell_var_fix;" ps_commands() { has="" - for i in $@ + for i in "$@" do case $i in (git) @@ -106,7 +106,7 @@ export PROMPT_COMMAND="shell_var_fix;" [ -n "$has" ] } right_slab() { - ps_commands $@ && echo "$PS_RIGHT_SLAB" + ps_commands "$@" && echo "$PS_RIGHT_SLAB" } ps_space() { @@ -305,8 +305,8 @@ EOF # Kill process and run in the background res() { - pkill $@ - bgr $@ + pkill "$@" + bgr "$@" } # Launch .desktop application (either full path or just name) @@ -331,7 +331,7 @@ EOF # File operations {{{ cp() { - command cp -p $@ + command cp -p "$@" } metas() { @@ -401,7 +401,7 @@ v() { if [ -f ".vim-session" ] && [ -z "$1" ]; then vim -S .vim-session else - vim $@ + vim "$@" fi } @@ -409,7 +409,7 @@ v() { grap() { parent="$1" shift - grit add -p $parent -- $@ + grit add -p $parent -- "$@" } onemo() { -- cgit v1.2.3