@@ -10,7 +10,7 @@ use std::ffi::{OsStr, OsString};
1010use std:: io:: { StdoutLock , Write , stdout} ;
1111use uucore:: error:: UResult ;
1212use uucore:: format:: { FormatChar , OctalParsing , parse_escape_only} ;
13- use uucore:: { format_usage, os_str_as_bytes} ;
13+ use uucore:: { crate_version , format_usage, os_str_as_bytes} ;
1414
1515use uucore:: translate;
1616
@@ -166,7 +166,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
166166 uu_app ( ) . print_help ( ) ?;
167167 return Ok ( ( ) ) ;
168168 } else if first_arg == "--version" && args. peek ( ) . is_none ( ) {
169- write ! ( stdout( ) , "{}" , uu_app ( ) . render_version ( ) ) ?;
169+ writeln ! ( stdout( ) , "echo {}" , crate_version! ( ) ) ?;
170170 return Ok ( ( ) ) ;
171171 }
172172
@@ -186,17 +186,17 @@ pub fn uu_app() -> Command {
186186 // Note: echo is different from the other utils in that it should **not**
187187 // have `infer_long_args(true)`, because, for example, `--ver` should be
188188 // printed as `--ver` and not show the version text.
189- Command :: new ( uucore :: util_name ( ) )
189+ Command :: new ( "echo" )
190190 // TrailingVarArg specifies the final positional argument is a VarArg
191191 // and it doesn't attempts the parse any further args.
192192 // Final argument must have multiple(true) or the usage string equivalent.
193193 . trailing_var_arg ( true )
194194 . allow_hyphen_values ( true )
195- . version ( uucore :: crate_version!( ) )
195+ . version ( crate_version ! ( ) )
196196 . about ( translate ! ( "echo-about" ) )
197197 . after_help ( translate ! ( "echo-after-help" ) )
198198 . override_usage ( format_usage ( & translate ! ( "echo-usage" ) ) )
199- . help_template ( uucore:: localized_help_template ( uucore :: util_name ( ) ) )
199+ . help_template ( uucore:: localized_help_template ( "echo" ) )
200200 . arg (
201201 Arg :: new ( options:: NO_NEWLINE )
202202 . short ( 'n' )
0 commit comments