Add -r for xargs

This commit is contained in:
FollieHiyuki 2021-03-22 23:13:53 +03:00
parent 3e8194f5ee
commit 309a920067
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
5 changed files with 5 additions and 5 deletions

View File

@ -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"

View File

@ -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'

View File

@ -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"

View File

@ -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

View File

@ -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