File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,10 @@ use crate::signals::setup_signal_handling;
1515use crate :: utils:: is_process_in_foreground;
1616use cli:: terminal:: read_nonblocking_char;
1717use cli:: vi:: { Action , ViEditor } ;
18+ use gettextrs:: { bind_textdomain_codeset, setlocale, textdomain, LocaleCategory } ;
1819use nix:: sys:: signal:: { sigaction, SaFlags , SigAction , SigSet } ;
1920use nix:: sys:: signal:: { SigHandler , Signal as NixSignal } ;
21+ use std:: error:: Error ;
2022use std:: io;
2123use std:: io:: Write ;
2224use std:: os:: fd:: AsFd ;
@@ -239,7 +241,11 @@ fn interactive_shell(shell: &mut Shell) {
239241 }
240242}
241243
242- fn main ( ) {
244+ fn main ( ) -> Result < ( ) , Box < dyn Error > > {
245+ setlocale ( LocaleCategory :: LcAll , "" ) ;
246+ textdomain ( "posixutils-rs" ) ?;
247+ bind_textdomain_codeset ( "posixutils-rs" , "UTF-8" ) ?;
248+
243249 let args = parse_args ( std:: env:: args ( ) . collect ( ) , is_attached_to_terminal ( ) ) . unwrap ( ) ;
244250 let mut shell = Shell :: initialize_from_system (
245251 args. program_name ,
You can’t perform that action at this time.
0 commit comments