mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-28 18:28:35 -05:00
Add -r for xargs
This commit is contained in:
parent
ff0ef43c25
commit
4c95f5a213
@ -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"
|
||||
|
@ -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'
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user