mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 16:52:46 +08:00
Make stream.append call sites consistent
Maybe the wrong direction.. but this seems to be the majority.
This commit is contained in:
parent
2fb352a9e4
commit
1bfdc33f76
|
@ -23,7 +23,7 @@ pub fn emit(
|
|||
let Some(event_name) = argv.get(opts.optind) else {
|
||||
streams
|
||||
.err
|
||||
.append(&sprintf!("%ls: expected event name\n"L, cmd));
|
||||
.append(sprintf!("%ls: expected event name\n"L, cmd));
|
||||
return STATUS_INVALID_ARGS;
|
||||
};
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ impl StringSubCommand<'_> for Transform {
|
|||
n_transformed += 1;
|
||||
}
|
||||
if !self.quiet {
|
||||
streams.out.append(&transformed);
|
||||
streams.out.append(transformed);
|
||||
if want_newline {
|
||||
streams.out.append1('\n');
|
||||
}
|
||||
|
|
|
@ -866,7 +866,7 @@ pub fn print(streams: &mut io_streams_t, type_filter: &wstr) {
|
|||
last_type = std::mem::discriminant(&evt.desc);
|
||||
streams
|
||||
.out
|
||||
.append(&sprintf!(L!("Event %ls\n"), evt.desc.name()));
|
||||
.append(sprintf!(L!("Event %ls\n"), evt.desc.name()));
|
||||
}
|
||||
|
||||
match &evt.desc {
|
||||
|
@ -874,18 +874,18 @@ pub fn print(streams: &mut io_streams_t, type_filter: &wstr) {
|
|||
let name: WString = signal.name().into();
|
||||
streams
|
||||
.out
|
||||
.append(&sprintf!(L!("%ls %ls\n"), name, evt.function_name));
|
||||
.append(sprintf!(L!("%ls %ls\n"), name, evt.function_name));
|
||||
}
|
||||
EventDescription::ProcessExit { .. } | EventDescription::JobExit { .. } => {}
|
||||
EventDescription::CallerExit { .. } => {
|
||||
streams
|
||||
.out
|
||||
.append(&sprintf!(L!("caller-exit %ls\n"), evt.function_name));
|
||||
.append(sprintf!(L!("caller-exit %ls\n"), evt.function_name));
|
||||
}
|
||||
EventDescription::Variable { name: param } | EventDescription::Generic { param } => {
|
||||
streams
|
||||
.out
|
||||
.append(&sprintf!(L!("%ls %ls\n"), param, evt.function_name));
|
||||
.append(sprintf!(L!("%ls %ls\n"), param, evt.function_name));
|
||||
}
|
||||
EventDescription::Any => unreachable!(),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user