m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

Updated Examples (markdown)

D630
2015-05-30 13:19:17 +02:00
parent 53053c9756
commit 295871e18d

@@ -142,31 +142,20 @@ builtin bind '"\C-r": "\C-x1\e^\er"'
# Toggle bash options (set and shopt)
BOLD=$(tput bold || tput md)
#RESET=$(tput sgr0 || tput me)
RESET=$(tput sgr0 || tput me)
GREEN=$(tput setaf 2 || tput AF 2)
RED=$(tput setaf 1)
RED=$(tput setaf 1 || tput AF 1)
#WHITE=$(tput setaf 7 || tput AF 7)
while read -r b o n _
do
case $b in
shopt)
if [[ $o == -u ]]
then
shopt -s "$n"
else
shopt -u "$n"
fi
;;
set)
if [[ $o == \+o ]]
then
set -o "$n"
else
set +o "$n"
fi
;;
case "${b}${o}" in
"set+o") set -o "$n" ;;
"set-o") set +o "$n" ;;
"shopt-s") shopt -u "$n" ;;
"shopt-u") shopt -s "$n" ;;
esac
printf ${RESET}
done < <(
< <(shopt -p ; shopt -op) sed "
/ -[so] / {