@@ -39,6 +39,7 @@ fn display_help() {
3939 println ! ( " --color-semver-updates <colors> Check the difference of semantic versions and color them using the given colors." ) ;
4040 println ! ( " The order of pango markup hex colors for colored updates is Major, Minor, Patch, Pre, Other." ) ;
4141 println ! ( " (default: ff0000,00ff00,0000ff,ff00ff,ffffff)" ) ;
42+ println ! ( " --arrow-style <symbol> Changes the style of the arrows, which are displayed between version updates." ) ;
4243 println ! ( ) ;
4344}
4445
@@ -56,6 +57,7 @@ fn main() -> Result<(), Error> {
5657 let mut color_semver_updates = false ;
5758 let mut semver_updates_colors = [ "ff0000" , "00ff00" , "0000ff" , "ff00ff" , "ffffff" ] ;
5859 let mut no_aur = false ;
60+ let mut arrow_style = "->" ;
5961 if args. len ( ) > 1 {
6062 for ( i, arg) in args. iter ( ) . enumerate ( ) {
6163 if arg == "--help" {
@@ -89,6 +91,10 @@ fn main() -> Result<(), Error> {
8991 . take ( semver_updates_colors. len ( ) )
9092 . for_each ( |( index, color) | semver_updates_colors[ index] = color) ;
9193 }
94+ } else if arg == "--arrow-style" {
95+ if i + 1 < args. len ( ) {
96+ arrow_style = args[ i + 1 ] . as_str ( ) ;
97+ }
9298 }
9399 }
94100 }
@@ -111,6 +117,7 @@ fn main() -> Result<(), Error> {
111117 } else {
112118 get_aur_updates ( )
113119 } ;
120+
114121 let updates = pacman_updates + aur_updates;
115122 let mut stdout = if !aur_stdout. is_empty ( ) && !pacman_stdout. is_empty ( ) {
116123 format ! ( "{}\n {}" , pacman_stdout, aur_stdout)
@@ -119,7 +126,12 @@ fn main() -> Result<(), Error> {
119126 } else {
120127 pacman_stdout
121128 } ;
129+
122130 if updates > 0 {
131+ if arrow_style != "->" {
132+ stdout = stdout. replace ( "->" , arrow_style) ;
133+ }
134+
123135 if tooltip_align {
124136 let mut padding = [ 0 ; 4 ] ;
125137 stdout
0 commit comments