Merge pull request #671 from sambostock/improve-ignore-io

Improve ignore-io
This commit is contained in:
罗泽轩 2017-10-15 10:37:39 +08:00 committed by GitHub
commit 7b76644bc6

View file

@ -8,16 +8,27 @@ update_gi_list() {
}
print_in_alphabetical_order() {
for i in {a..z};
local first_character previous_first_character ignorable
local first=true
for ignorable in $(echo "$gi_list" | sort);
do
echo "$gi_list" | grep "^$i" | tr "\n" " "
echo
first_character=${ignorable:0:1}
if [[ $first_character = $previous_first_character ]]; then
printf " %s" "$ignorable"
elif [[ $first = true ]]; then
previous_first_character=$first_character
first=false
printf "%s" "$ignorable"
else
previous_first_character=$first_character
printf "\n%s" "$ignorable"
fi
done
echo
}
print_in_table_format() {
table_width=5
echo "$gi_list" | xargs -n $table_width | column -t
echo "$gi_list" | column
}
search() {