doc terminal-compatibility: document Unicode characters used in output

Not sure if this will be useful but the fact that we use very
few Unicode characters, suggests that we are insecure about
this. Having some kind of central and explicit listing might help
future decision-making.  Obviously, completions and translations use
more characters, but those are not as central.
This commit is contained in:
Johannes Altmanninger
2025-11-06 14:58:11 +01:00
parent 828773b391
commit a8b7d89ba5
4 changed files with 17 additions and 6 deletions

View File

@@ -285,3 +285,13 @@ Or add this to your ``config.fish``::
commandline -f repaint
functions --erase GNU-screen-workaround
end
Unicode Codepoints
------------------
By default, fish outputs the following non-ASCII characters::
× ► ¶ ⏎ • ● … μ “ ” ← → ↑ ↓
as well as control pictures (U+2400 through U+241F),
and locale-specific ones in :ref:`translated strings <variables-locale>`.

View File

@@ -378,6 +378,8 @@ function __fish_help_describe -a help_item
return
case terminal-compatibility#required-commands
return
case terminal-compatibility#unicode-codepoints
return
case tutorial
echo (_ Tutorial)
case tutorial#autoloading-functions

View File

@@ -1032,10 +1032,9 @@ pub fn shell_modes() -> MutexGuard<'static, libc::termios> {
crate::reader::SHELL_MODES.lock().unwrap()
}
/// The character to use where the text has been truncated. Is an ellipsis on unicode system and a $
/// on other systems.
/// The character to use where the text has been truncated.
pub fn get_ellipsis_char() -> char {
'\u{2026}'
'\u{2026}' // ('…')
}
/// The character or string to use where text has been truncated (ellipsis if possible, otherwise
@@ -1245,7 +1244,7 @@ macro_rules! LL {
// neither of \u23CE and \u25CF can be displayed in the default fonts on Windows, though
// they can be *encoded* just fine. Use alternative glyphs.
OMITTED_NEWLINE_STR.store(LL!("\u{00b6}")); // "pilcrow"
OBFUSCATION_READ_CHAR.store(u32::from('\u{2022}'), Ordering::Relaxed); // "bullet"
OBFUSCATION_READ_CHAR.store(u32::from('\u{2022}'), Ordering::Relaxed); // "bullet" (•)
} else if is_console_session() {
OMITTED_NEWLINE_STR.store(LL!("^J"));
OBFUSCATION_READ_CHAR.store(u32::from('*'), Ordering::Relaxed);
@@ -1253,7 +1252,7 @@ macro_rules! LL {
OMITTED_NEWLINE_STR.store(LL!("\u{23CE}")); // "return symbol" (⏎)
OBFUSCATION_READ_CHAR.store(
u32::from(
'\u{25CF}', // "black circle"
'\u{25CF}', // "black circle" (●)
),
Ordering::Relaxed,
);

View File

@@ -1389,7 +1389,7 @@ fn get_deferred_process(j: &Job) -> Option<usize> {
}
/// Given that we failed to execute process `failed_proc` in job `job`, mark that process and
/// every subsequent process in the pipeline as aborted before launch.
/// every subsequent process in the pipeline as aborted before launch.
fn abort_pipeline_from(job: &Job, offset: usize) {
for p in job.processes().iter().skip(offset) {
p.mark_aborted_before_launch();