mirror of
https://github.com/tj/git-extras.git
synced 2026-09-15 18:06:24 -04:00
Merge pull request #671 from sambostock/improve-ignore-io
Improve ignore-io
This commit is contained in:
commit
7b76644bc6
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue