From 309a92006727f6cd618f62467037a5ea5aa0e89f Mon Sep 17 00:00:00 2001 From: FollieHiyuki Date: Mon, 22 Mar 2021 23:13:53 +0300 Subject: [PATCH] Add -r for xargs --- home/.bashrc-bloated | 2 +- home/.config/fish/conf.d/aliases.fish | 2 +- home/.config/zsh/aliases.zsh | 2 +- home/.local/bin/X11/dwinswitch | 2 +- home/.local/bin/dict | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/home/.bashrc-bloated b/home/.bashrc-bloated index d713636..be24f33 100644 --- a/home/.bashrc-bloated +++ b/home/.bashrc-bloated @@ -398,7 +398,7 @@ alias ncdu="ncdu --color=dark" alias ip="ip -color=always" # vim alias v="nvim" -alias vi='fzf | xargs nvim -o' +alias vi='fzf | xargs -r nvim -o' # emacs alias doom="$HOME/.config/emacs/bin/doom" alias e="emacs -nw" diff --git a/home/.config/fish/conf.d/aliases.fish b/home/.config/fish/conf.d/aliases.fish index 7355292..7eb29e1 100644 --- a/home/.config/fish/conf.d/aliases.fish +++ b/home/.config/fish/conf.d/aliases.fish @@ -29,7 +29,7 @@ alias ncdu='ncdu --color=dark' alias ip='ip -color=always' # vim abbr v nvim -abbr vi 'fzf | xargs nvim -o' +abbr vi 'fzf | xargs -r nvim -o' # emacs alias doom='$HOME/.config/emacs/bin/doom' abbr e 'emacs -nw' diff --git a/home/.config/zsh/aliases.zsh b/home/.config/zsh/aliases.zsh index 79a57a4..bf4e115 100644 --- a/home/.config/zsh/aliases.zsh +++ b/home/.config/zsh/aliases.zsh @@ -23,7 +23,7 @@ alias ncdu="ncdu --color=dark" alias ip="ip -color=always" # vim alias v="nvim" -alias vi='fzf | xargs nvim -o' +alias vi='fzf | xargs -r nvim -o' # emacs alias doom="$HOME/.config/emacs/bin/doom" alias e="emacs -nw" diff --git a/home/.local/bin/X11/dwinswitch b/home/.local/bin/X11/dwinswitch index ca12fce..5905493 100755 --- a/home/.local/bin/X11/dwinswitch +++ b/home/.local/bin/X11/dwinswitch @@ -4,4 +4,4 @@ list=$(wmctrl -l) num=$(echo "$list" | awk '{ $1=$2=$3=""; gsub(/^ */,""); printf "%3d - %s\n", NR, $0; }' | dmenu -l 20 -p "window" | cut -d '-' -f 1) [ -z "$num" ] && exit -echo "$list" | awk -v N="$num" 'NR == N { print $1; }' | xargs wmctrl -i -a +echo "$list" | awk -v N="$num" 'NR == N { print $1; }' | xargs -r wmctrl -i -a diff --git a/home/.local/bin/dict b/home/.local/bin/dict index e4b511d..c1dba1b 100755 --- a/home/.local/bin/dict +++ b/home/.local/bin/dict @@ -7,7 +7,7 @@ underline=$(tput smul) esc=$(tput sgr0) if [ -z "$1" ]; then - aspell dump master | sort | fzf --no-multi | xargs dict + aspell dump master | sort | fzf --no-multi | xargs -r dict else curl -s "dict://dict.org/d:$1" | sed -n -e '/^151.*/,/^\./p' | sed -e 's/^151.*//g' -e '/^\./D' -e '/^\s*1\./i\\' -e "s/{\([^{]*\)}/${esc}${bold}${underline}\1${esc}/g" -e "s/^\($1\)\(\W\)/${esc}${bold}${red}\1${esc}\2/gI" -e "s/^\(\s*\)\([0-9]\.\)/\1${esc}${bold}${cyan}\2${esc}/g" -e 's/--/—/g' -e 's/—\(\w\)/— \1/g' fi