Conversation
|
Very cool! Thank you! Did you know there's a really flexible way to do border titles without the library change? The technique is little obscure, but it's pretty powerful: diff --git a/examples/picker.rs b/examples/picker.rs
index 2ab1021..b2edff8 100644
--- a/examples/picker.rs
+++ b/examples/picker.rs
@@ -94,8 +94,8 @@ fn Prompt<'a>(props: &'a PromptProps, _hooks: Hooks) -> impl Into<AnyElement<'st
};
element! {
- View(border_style: BorderStyle::Round, flex_grow: 1.0, height: 3, border_title: Some(BorderTitle { title: props.title.clone(), pos: BorderTitlePos::Bottom })) {
- Fragment {
+ View(border_style: BorderStyle::Round, flex_grow: 1.0, height: 3, flex_direction: FlexDirection::Column) {
+ View {
#( if props.show_carrot { Some(
element! { Text(content: ">", color: Some(Color::Red)) })
} else { None }
@@ -105,6 +105,9 @@ fn Prompt<'a>(props: &'a PromptProps, _hooks: Hooks) -> impl Into<AnyElement<'st
}
Text(content: format!(" {}/{}", props.nelms.0, props.nelms.1), color: Some(Color::DarkGrey))
}
+ View(margin_bottom: -1, justify_content: JustifyContent::Center) {
+ Text(content: &props.title)
+ }
}
}
}
@@ -169,19 +172,24 @@ fn Results<'a>(props: &'a ResultsProps, mut hooks: Hooks) -> impl Into<AnyElemen
});
element! {
- View(flex_grow: 1.0, flex_direction: FlexDirection::Column, height: 20, border_style: BorderStyle::Round, overflow: Some(Overflow::Hidden), border_title: Some(BorderTitle { title: "Results".to_owned(), pos: BorderTitlePos::Top })) {
- #(props.elms.iter().enumerate().skip(beginning.get() as usize)
- .map(|(idx, mat)| if current_idx.get() as usize == idx {
- (Color::DarkGrey, mat)
- } else {
- (Color::Reset, mat)
- })
- .map(|(color, mat)| element! {
- View(flex_direction: FlexDirection::Row, background_color: Some(color)) {
- View(width: max_len + 2, height: 1) { Text(content: mat.0.clone(), color: Some(Color::Cyan), weight: Weight::Bold) }
- View(width: 80 - max_len - 2) {MixedText(contents: mat.1.clone(), wrap: TextWrap::NoWrap) }
- }
- }).take(18))
+ View(flex_grow: 1.0, flex_direction: FlexDirection::Column, border_style: BorderStyle::Round) {
+ View(margin_top: -1, justify_content: JustifyContent::Center) {
+ Text(content: "Results")
+ }
+ View(flex_direction: FlexDirection::Column) {
+ #(props.elms.iter().enumerate().skip(beginning.get() as usize)
+ .map(|(idx, mat)| if current_idx.get() as usize == idx {
+ (Color::DarkGrey, mat)
+ } else {
+ (Color::Reset, mat)
+ })
+ .map(|(color, mat)| element! {
+ View(flex_direction: FlexDirection::Row, background_color: Some(color), overflow: Overflow::Hidden) {
+ View(width: max_len + 2, height: 1) { Text(content: mat.0.clone(), color: Some(Color::Cyan), weight: Weight::Bold) }
+ View(width: 80 - max_len - 2) {MixedText(contents: mat.1.clone(), wrap: TextWrap::NoWrap) }
+ }
+ }).take(18))
+ }
}
}
}I'm not necessarily opposed to adding a clearer API for border titles, but for this PR it might be good to focus on the example and leave out the API change. |
|
yes I have seen this in a test case for the view component. Setting I will remove it for now, the PR is not finished yet, as you probably have seen. I also want to add a Page preview and perhaps allow for different layouts. |
Extend the example suitcase with a man-page picker modeled after the Telescope Neovim plugin. You can scroll through a list of _results_ filtered by a _prompt_ in two independent views. Also adds a `border_title` key to `ViewProps` for rendering a string overlay centered at either bottom or top border.
ccbrown
left a comment
There was a problem hiding this comment.
Example lgtm!
A few notes on the use_component_rect API. And would you add a small screenshot and one-line description to examples/README.md?
Thanks!
| /// See [`ComponentDrawer::canvas_position`] and [`ComponentDrawer::size`] for more info. | ||
| pub trait UseComponentRect<'a>: private::Sealed { | ||
| /// Returns the curent component canvas position and size in form of a [`Rect`]. | ||
| fn use_component_rect(&mut self) -> ComponentRectRef; |
There was a problem hiding this comment.
I think it'd be better to just return a Option<Rect<u16>> instead of a Ref. That way users don't have to call .get().
Btw I don't think there's really much benefit to using Ref at all since you can just store the rect on UseComponentRectImpl directly.
There was a problem hiding this comment.
Those changes were pulled in from and belong to #145 Will rebase once merged
| pub type ComponentRectRef = Ref<Option<Rect<u16>>>; | ||
|
|
||
| /// `UseComponentRect` is a hook that returns the current component's canvas position and size | ||
| /// from the previous frame, or `None` if it's the first frame. |
There was a problem hiding this comment.
It might be worth adding something like...
This hook will cause the component to be immediately re-rendered a second time, or whenever the component's position or size change. If the component's position or size change again during this re-render, it may cause an infinite render loop.
What did you use to make the screenshot with window decoration? |
What is the output of |
|
and maybe filter out entries without a title for aesthetic reasons |
Apparently macOS switched from /// Converts backspace-encoded man page formatting to ANSI SGR escape sequences.
///
/// nroff/mandoc encodes bold as `X\bX` (character + backspace + same character)
/// and underline as `_\bX` (underscore + backspace + character). This converts
/// those to the equivalent SGR sequences so terminals render them correctly.
fn bs_to_sgr(input: &str) -> String {
let chars: Vec<char> = input.chars().collect();
let n = chars.len();
let mut out = String::with_capacity(input.len());
let mut i = 0;
let mut bold = false;
let mut underline = false;
while i < n {
if i + 2 < n && chars[i + 1] == '\x08' {
let a = chars[i];
let b = chars[i + 2];
let (new_bold, new_underline, ch) = if a == '_' {
// _\bX — underline X
(bold, true, b)
} else if b == '_' {
// X\b_ — underline X (alternate encoding)
(bold, true, a)
} else if a == b {
// X\bX — bold X
(true, underline, a)
} else {
// Unknown overstrike, preserve b with current style
(bold, underline, b)
};
if new_bold != bold || new_underline != underline {
out.push_str("\x1b[0m");
if new_bold {
out.push_str("\x1b[1m");
}
if new_underline {
out.push_str("\x1b[4m");
}
bold = new_bold;
underline = new_underline;
}
out.push(ch);
i += 3;
} else if chars[i] == '\x08' {
// Lone backspace — skip
i += 1;
} else {
if bold || underline {
out.push_str("\x1b[0m");
bold = false;
underline = false;
}
out.push(chars[i]);
i += 1;
}
}
if bold || underline {
out.push_str("\x1b[0m");
}
out
}I visually confirmed that the output looks identical and contains no BS characters. This might be a bit much for an example, so maybe it's worth creating and importing a separate crate for this? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
+ Coverage 90.06% 90.36% +0.30%
==========================================
Files 32 33 +1
Lines 5333 5375 +42
Branches 5333 5375 +42
==========================================
+ Hits 4803 4857 +54
+ Misses 427 414 -13
- Partials 103 104 +1
🚀 New features to boost your workflow:
|
|
a more elegant solution would pip through less, can you check output of |
I'm actually not sure of a good way to test this. |
|
same for |
That seems to work! Tested with: use smol::process::{Command, Stdio};
fn main() {
smol::block_on(async {
let res = Command::new("sh")
.args(&["-c", "man ls | ul"])
.env("MAN_KEEP_FORMATTING", "1")
.stdout(Stdio::piped())
.output()
.await
.unwrap();
let output = &res.stdout;
let bs_count = output.iter().filter(|&&b| b == 0x08).count();
let control_count = output.iter().filter(|&&b| b == 0x1b).count();
println!("{:?}", String::from_utf8_lossy(output));
println!("Backspace count: {}", bs_count);
println!("Control count: {}", control_count);
});
}That gives me: "LS(1) General Commands Manual LS(1)\n\n\u{1b}[1mNAME\u{1b}[0m\n \u{1b}[1mls\u{1b}[0m – list directory contents\n\n\u{1b}[1mSYNOPSIS\u{1b}[0m\n \u{1b}[1mls\u{1b}[0m [\u{1b}[1m-@ABCFGHILOPRSTUWabcdefghiklmnopqrstuvwxy1%,\u{1b}[0m] [\u{1b}[1m--color\u{1b}[0m=\u{1b}[4mwhen\u{1b}[24m]\n [\u{1b}[1m-D\u{1b}[0m \u{1b}[4mformat\u{1b}[24m] [\u{1b}[4mfile\u{1b}[24m \u{1b}[4m...\u{1b}[24m]\n\n\u{1b}[1mDESCRIPTION\u{1b}[0m\n For each operand that names a \u{1b}[4mfile\u{1b}[24m of a type other than directory, \u{1b}[1mls\u{1b}[0m\n displays its name as well as any requested, associated information. For\n each operand that names a \u{1b}[4mfile\u{1b}[24m of type directory, \u{1b}[1mls\u{1b}[0m displays the names\n of files contained within that directory, as well as any requested,\n associated information.\n\n If no operands are given, the contents of the current directory are\n displayed. If more than one operand is given, non-directory operands are\n displayed first; directory and non-directory operands are sorted\n separately and in lexicographical order.\n\n The following options are available:\n\n \u{1b}[1m-@\u{1b}[0m Display extended attribute keys and sizes in long (\u{1b}[1m-l\u{1b}[0m) output.\n\n \u{1b}[1m-A\u{1b}[0m Include directory entries whose names begin with a dot (‘\u{1b}[4m.\u{1b}[24m’)\n except for \u{1b}[4m.\u{1b}[24m and \u{1b}[4m..\u{1b}[24m. Automatically set for the super-user unless\n \u{1b}[1m-I\u{1b}[0m is specified.\n\n \u{1b}[1m-B\u{1b}[0m Force printing of non-printable characters (as defined by\n ctype(3) and current locale settings) in file names as \\\u{1b}[4mxxx\u{1b}[24m,\n where \u{1b}[4mxxx\u{1b}[24m is the numeric value of the character in octal. This\n option is not defined in IEEE Std 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-C\u{1b}[0m Force multi-column output; this is the default when output is to\n a terminal.\n\n \u{1b}[1m-D\u{1b}[0m \u{1b}[4mformat\u{1b}[24m\n When printing in the long (\u{1b}[1m-l\u{1b}[0m) format, use \u{1b}[4mformat\u{1b}[24m to format the\n date and time output. The argument \u{1b}[4mformat\u{1b}[24m is a string used by\n strftime(3). Depending on the choice of format string, this may\n result in a different number of columns in the output. This\n option overrides the \u{1b}[1m-T\u{1b}[0m option. This option is not defined in\n IEEE Std 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-F\u{1b}[0m Display a slash (‘/’) immediately after each pathname that is a\n directory, an asterisk (‘*’) after each that is executable, an at\n sign (‘@’) after each symbolic link, an equals sign (‘=’) after\n each socket, a percent sign (‘%’) after each whiteout, and a\n vertical bar (‘|’) after each that is a FIFO.\n\n \u{1b}[1m-G\u{1b}[0m Enable colorized output. This option is equivalent to defining\n CLICOLOR or COLORTERM in the environment and setting\n \u{1b}[1m--color\u{1b}[0m=\u{1b}[4mauto\u{1b}[24m. (See below.) This functionality can be compiled\n out by removing the definition of COLORLS. This option is not\n defined in IEEE Std 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-H\u{1b}[0m Symbolic links on the command line are followed. This option is\n assumed if none of the \u{1b}[1m-F\u{1b}[0m, \u{1b}[1m-d\u{1b}[0m, or \u{1b}[1m-l\u{1b}[0m options are specified.\n\n \u{1b}[1m-I\u{1b}[0m Prevent \u{1b}[1m-A\u{1b}[0m from being automatically set for the super-user. This\n option is not defined in IEEE Std 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-L\u{1b}[0m Follow all symbolic links to final target and list the file or\n directory the link references rather than the link itself. This\n option cancels the \u{1b}[1m-P\u{1b}[0m option.\n\n \u{1b}[1m-O\u{1b}[0m Include the file flags in a long (\u{1b}[1m-l\u{1b}[0m) output. This option is\n incompatible with IEEE Std 1003.1-2008 (“POSIX.1”). See\n chflags(1) for a list of file flags and their meanings.\n\n \u{1b}[1m-P\u{1b}[0m If argument is a symbolic link, list the link itself rather than\n the object the link references. This option cancels the \u{1b}[1m-H\u{1b}[0m and\n \u{1b}[1m-L\u{1b}[0m options.\n\n \u{1b}[1m-R\u{1b}[0m Recursively list subdirectories encountered.\n\n \u{1b}[1m-S\u{1b}[0m Sort by size (largest file first) before sorting the operands in\n lexicographical order.\n\n \u{1b}[1m-T\u{1b}[0m When printing in the long (\u{1b}[1m-l\u{1b}[0m) format, display complete time\n information for the file, including month, day, hour, minute,\n second, and year. The \u{1b}[1m-D\u{1b}[0m option gives even more control over the\n output format. This option is not defined in IEEE Std\n 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-U\u{1b}[0m Use time when file was created for sorting or printing. This\n option is not defined in IEEE Std 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-W\u{1b}[0m Display whiteouts when scanning directories. This option is not\n defined in IEEE Std 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-X\u{1b}[0m When listing recursively, do not descend into directories that\n would cross file system boundaries. More specifically, this\n option will prevent descending into directories that have a\n different device number.\n\n \u{1b}[1m-a\u{1b}[0m Include directory entries whose names begin with a dot (‘\u{1b}[4m.\u{1b}[24m’).\n\n \u{1b}[1m-b\u{1b}[0m As \u{1b}[1m-B\u{1b}[0m, but use C escape codes whenever possible. This option is\n not defined in IEEE Std 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-c\u{1b}[0m Use time when file status was last changed for sorting or\n printing.\n\n \u{1b}[1m--color\u{1b}[0m=\u{1b}[4mwhen\u{1b}[24m\n Output colored escape sequences based on \u{1b}[4mwhen\u{1b}[24m, which may be set\n to either \u{1b}[1malways\u{1b}[0m, \u{1b}[1mauto\u{1b}[0m, or \u{1b}[1mnever\u{1b}[0m.\n\n \u{1b}[1malways\u{1b}[0m will make \u{1b}[1mls\u{1b}[0m always output color. If TERM is unset or set\n to an invalid terminal, then \u{1b}[1mls\u{1b}[0m will fall back to explicit ANSI\n escape sequences without the help of termcap(5). \u{1b}[1malways\u{1b}[0m is the\n default if \u{1b}[1m--color\u{1b}[0m is specified without an argument.\n\n \u{1b}[1mauto\u{1b}[0m will make \u{1b}[1mls\u{1b}[0m output escape sequences based on termcap(5),\n but only if stdout is a tty and either the \u{1b}[1m-G\u{1b}[0m flag is specified\n or the COLORTERM environment variable is set and not empty.\n\n \u{1b}[1mnever\u{1b}[0m will disable color regardless of environment variables.\n \u{1b}[1mnever\u{1b}[0m is the default when neither \u{1b}[1m--color\u{1b}[0m nor \u{1b}[1m-G\u{1b}[0m is specified.\n\n For compatibility with GNU coreutils, \u{1b}[1mls\u{1b}[0m supports \u{1b}[1myes\u{1b}[0m or \u{1b}[1mforce\u{1b}[0m as\n equivalent to \u{1b}[1malways\u{1b}[0m, \u{1b}[1mno\u{1b}[0m or \u{1b}[1mnone\u{1b}[0m as equivalent to \u{1b}[1mnever\u{1b}[0m, and \u{1b}[1mtty\u{1b}[0m\n or \u{1b}[1mif-tty\u{1b}[0m as equivalent to \u{1b}[1mauto\u{1b}[0m.\n\n \u{1b}[1m-d\u{1b}[0m Directories are listed as plain files (not searched recursively).\n\n \u{1b}[1m-e\u{1b}[0m Print the Access Control List (ACL) associated with the file, if\n present, in long (\u{1b}[1m-l\u{1b}[0m) output.\n\n \u{1b}[1m-f\u{1b}[0m Output is not sorted. This option turns on \u{1b}[1m-a\u{1b}[0m. It also negates\n the effect of the \u{1b}[1m-r\u{1b}[0m, \u{1b}[1m-S\u{1b}[0m and \u{1b}[1m-t\u{1b}[0m options. As allowed by IEEE Std\n 1003.1-2008 (“POSIX.1”), this option has no effect on the \u{1b}[1m-d\u{1b}[0m, \u{1b}[1m-l\u{1b}[0m,\n \u{1b}[1m-R\u{1b}[0m and \u{1b}[1m-s\u{1b}[0m options.\n\n \u{1b}[1m-g\u{1b}[0m This option has no effect. It is only available for\n compatibility with 4.3BSD, where it was used to display the group\n name in the long (\u{1b}[1m-l\u{1b}[0m) format output. This option is incompatible\n with IEEE Std 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-h\u{1b}[0m When used with the \u{1b}[1m-l\u{1b}[0m option, use unit suffixes: Byte, Kilobyte,\n Megabyte, Gigabyte, Terabyte and Petabyte in order to reduce the\n number of digits to four or fewer using base 2 for sizes. This\n option is not defined in IEEE Std 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-i\u{1b}[0m For each file, print the file's file serial number (inode\n number).\n\n \u{1b}[1m-k\u{1b}[0m This has the same effect as setting environment variable\n BLOCKSIZE to 1024, except that it also nullifies any \u{1b}[1m-h\u{1b}[0m options\n to its left.\n\n \u{1b}[1m-l\u{1b}[0m (The lowercase letter “ell”.) List files in the long format, as\n described in the \u{1b}[4mThe\u{1b}[24m \u{1b}[4mLong\u{1b}[24m \u{1b}[4mFormat\u{1b}[24m subsection below.\n\n \u{1b}[1m-m\u{1b}[0m Stream output format; list files across the page, separated by\n commas.\n\n \u{1b}[1m-n\u{1b}[0m Display user and group IDs numerically rather than converting to\n a user or group name in a long (\u{1b}[1m-l\u{1b}[0m) output. This option turns on\n the \u{1b}[1m-l\u{1b}[0m option.\n\n \u{1b}[1m-o\u{1b}[0m List in long format, but omit the group id.\n\n \u{1b}[1m-p\u{1b}[0m Write a slash (‘/’) after each filename if that file is a\n directory.\n\n \u{1b}[1m-q\u{1b}[0m Force printing of non-graphic characters in file names as the\n character ‘?’; this is the default when output is to a terminal.\n\n \u{1b}[1m-r\u{1b}[0m Reverse the order of the sort.\n\n \u{1b}[1m-s\u{1b}[0m Display the number of blocks used in the file system by each\n file. Block sizes and directory totals are handled as described\n in \u{1b}[4mThe\u{1b}[24m \u{1b}[4mLong\u{1b}[24m \u{1b}[4mFormat\u{1b}[24m subsection below, except (if the long format\n is not also requested) the directory totals are not output when\n the output is in a single column, even if multi-column output is\n requested. (\u{1b}[1m-l\u{1b}[0m) format, display complete time information for\n the file, including month, day, hour, minute, second, and year.\n The \u{1b}[1m-D\u{1b}[0m option gives even more control over the output format.\n This option is not defined in IEEE Std 1003.1-2008 (“POSIX.1”).\n\n \u{1b}[1m-t\u{1b}[0m Sort by descending time modified (most recently modified first).\n If two files have the same modification timestamp, sort their\n names in ascending lexicographical order. The \u{1b}[1m-r\u{1b}[0m option reverses\n both of these sort orders.\n\n Note that these sort orders are contradictory: the time sequence\n is in descending order, the lexicographical sort is in ascending\n order. This behavior is mandated by IEEE Std 1003.2 (“POSIX.2”).\n This feature can cause problems listing files stored with\n sequential names on FAT file systems, such as from digital\n cameras, where it is possible to have more than one image with\n the same timestamp. In such a case, the photos cannot be listed\n in the sequence in which they were taken. To ensure the same\n sort order for time and for lexicographical sorting, set the\n environment variable LS_SAMESORT or use the \u{1b}[1m-y\u{1b}[0m option. This\n causes \u{1b}[1mls\u{1b}[0m to reverse the lexicographical sort order when sorting\n files with the same modification timestamp.\n\n \u{1b}[1m-u\u{1b}[0m Use time of last access, instead of time of last modification of\n the file for sorting (\u{1b}[1m-t\u{1b}[0m) or long printing (\u{1b}[1m-l\u{1b}[0m).\n\n \u{1b}[1m-v\u{1b}[0m Force unedited printing of non-graphic characters; this is the\n default when output is not to a terminal.\n\n \u{1b}[1m-w\u{1b}[0m Force raw printing of non-printable characters. This is the\n default when output is not to a terminal. This option is not\n defined in IEEE Std 1003.1-2001 (“POSIX.1”).\n\n \u{1b}[1m-x\u{1b}[0m The same as \u{1b}[1m-C\u{1b}[0m, except that the multi-column output is produced\n with entries sorted across, rather than down, the columns.\n\n \u{1b}[1m-y\u{1b}[0m When the \u{1b}[1m-t\u{1b}[0m option is set, sort the alphabetical output in the\n same order as the time output. This has the same effect as\n setting LS_SAMESORT. See the description of the \u{1b}[1m-t\u{1b}[0m option for\n more details. This option is not defined in IEEE Std 1003.1-2001\n (“POSIX.1”).\n\n \u{1b}[1m-%\u{1b}[0m Distinguish dataless files and directories with a '%' character\n in long (\u{1b}[1m-l\u{1b}[0m) output, and don't materialize dataless directories\n when listing them.\n\n \u{1b}[1m-1\u{1b}[0m (The numeric digit “one”.) Force output to be one entry per line.\n This is the default when output is not to a terminal.\n\n \u{1b}[1m-\u{1b}[0m, (Comma) When the \u{1b}[1m-l\u{1b}[0m option is set, print file sizes grouped and\n separated by thousands using the non-monetary separator returned\n by localeconv(3), typically a comma or period. If no locale is\n set, or the locale does not have a non-monetary separator, this\n option has no effect. This option is not defined in IEEE Std\n 1003.1-2001 (“POSIX.1”).\n\n The \u{1b}[1m-1\u{1b}[0m, \u{1b}[1m-C\u{1b}[0m, \u{1b}[1m-x\u{1b}[0m, and \u{1b}[1m-l\u{1b}[0m options all override each other; the last one\n specified determines the format used.\n\n The \u{1b}[1m-c\u{1b}[0m, \u{1b}[1m-u\u{1b}[0m, and \u{1b}[1m-U\u{1b}[0m options all override each other; the last one\n specified determines the file time used.\n\n The \u{1b}[1m-S\u{1b}[0m and \u{1b}[1m-t\u{1b}[0m options override each other; the last one specified\n determines the sort order used.\n\n The \u{1b}[1m-B\u{1b}[0m, \u{1b}[1m-b\u{1b}[0m, \u{1b}[1m-w\u{1b}[0m, and \u{1b}[1m-q\u{1b}[0m options all override each other; the last one\n specified determines the format used for non-printable characters.\n\n The \u{1b}[1m-H\u{1b}[0m, \u{1b}[1m-L\u{1b}[0m and \u{1b}[1m-P\u{1b}[0m options all override each other (either partially or\n fully); they are applied in the order specified.\n\n By default, \u{1b}[1mls\u{1b}[0m lists one entry per line to standard output; the\n exceptions are to terminals or when the \u{1b}[1m-C\u{1b}[0m or \u{1b}[1m-x\u{1b}[0m options are specified.\n\n File information is displayed with one or more ⟨blank⟩s separating the\n information associated with the \u{1b}[1m-i\u{1b}[0m, \u{1b}[1m-s\u{1b}[0m, and \u{1b}[1m-l\u{1b}[0m options.\n\n \u{1b}[1mThe\u{1b}[0m \u{1b}[1mLong\u{1b}[0m \u{1b}[1mFormat\u{1b}[0m\n If the \u{1b}[1m-l\u{1b}[0m option is given, the following information is displayed for\n each file: file mode, number of links, owner name, group name, number of\n bytes in the file, abbreviated month, day-of-month file was last\n modified, hour file last modified, minute file last modified, and the\n pathname. If the file or directory has extended attributes, the\n permissions field printed by the \u{1b}[1m-l\u{1b}[0m option is followed by a '@'\n character. Otherwise, if the file or directory has extended security\n information (such as an access control list), the permissions field\n printed by the \u{1b}[1m-l\u{1b}[0m option is followed by a '+' character. If the \u{1b}[1m-%\u{1b}[0m\n option is given, a '%' character follows the permissions field for\n dataless files and directories, possibly replacing the '@' or '+'\n character.\n\n If the modification time of the file is more than 6 months in the past or\n future, and the \u{1b}[1m-D\u{1b}[0m or \u{1b}[1m-T\u{1b}[0m are not specified, then the year of the last\n modification is displayed in place of the hour and minute fields.\n\n If the owner or group names are not a known user or group name, or the \u{1b}[1m-n\u{1b}[0m\n option is given, the numeric ID's are displayed.\n\n If the file is a character special or block special file, the device\n number for the file is displayed in the size field. If the file is a\n symbolic link the pathname of the linked-to file is preceded by “->”.\n\n The listing of a directory's contents is preceded by a labeled total\n number of blocks used in the file system by the files which are listed as\n the directory's contents (which may or may not include \u{1b}[4m.\u{1b}[24m and \u{1b}[4m..\u{1b}[24m and other\n files which start with a dot, depending on other options).\n\n The default block size is 512 bytes. The block size may be set with\n option \u{1b}[1m-k\u{1b}[0m or environment variable BLOCKSIZE. Numbers of blocks in the\n output will have been rounded up so the numbers of bytes is at least as\n many as used by the corresponding file system blocks (which might have a\n different size).\n\n The file mode printed under the \u{1b}[1m-l\u{1b}[0m option consists of the entry type and\n the permissions. The entry type character describes the type of file, as\n follows:\n\n \u{1b}[1m-\u{1b}[0m Regular file.\n \u{1b}[1mb\u{1b}[0m Block special file.\n \u{1b}[1mc\u{1b}[0m Character special file.\n \u{1b}[1md\u{1b}[0m Directory.\n \u{1b}[1ml\u{1b}[0m Symbolic link.\n \u{1b}[1mp\u{1b}[0m FIFO.\n \u{1b}[1ms\u{1b}[0m Socket.\n \u{1b}[1mw\u{1b}[0m Whiteout.\n\n The next three fields are three characters each: owner permissions, group\n permissions, and other permissions. Each field has three character\n positions:\n\n 1. If \u{1b}[1mr\u{1b}[0m, the file is readable; if \u{1b}[1m-\u{1b}[0m, it is not readable.\n\n 2. If \u{1b}[1mw\u{1b}[0m, the file is writable; if \u{1b}[1m-\u{1b}[0m, it is not writable.\n\n 3. The first of the following that applies:\n\n \u{1b}[1mS\u{1b}[0m If in the owner permissions, the file is not\n executable and set-user-ID mode is set. If in the\n group permissions, the file is not executable and\n set-group-ID mode is set.\n\n \u{1b}[1ms\u{1b}[0m If in the owner permissions, the file is\n executable and set-user-ID mode is set. If in the\n group permissions, the file is executable and\n setgroup-ID mode is set.\n\n \u{1b}[1mx\u{1b}[0m The file is executable or the directory is\n searchable.\n\n \u{1b}[1m-\u{1b}[0m The file is neither readable, writable,\n executable, nor set-user-ID nor set-group-ID mode,\n nor sticky. (See below.)\n\n These next two apply only to the third character in the last\n group (other permissions).\n\n \u{1b}[1mT\u{1b}[0m The sticky bit is set (mode 1000), but not execute\n or search permission. (See chmod(1) or\n sticky(7).)\n\n \u{1b}[1mt\u{1b}[0m The sticky bit is set (mode 1000), and is\n searchable or executable. (See chmod(1) or\n sticky(7).)\n\n The next field contains a plus (‘+’) character if the file has an ACL, or\n a space (‘ ’) if it does not. The \u{1b}[1mls\u{1b}[0m utility does not show the actual\n ACL unless the \u{1b}[1m-e\u{1b}[0m option is used in conjunction with the \u{1b}[1m-l\u{1b}[0m option.\n\n\u{1b}[1mENVIRONMENT\u{1b}[0m\n The following environment variables affect the execution of \u{1b}[1mls\u{1b}[0m:\n\n BLOCKSIZE If this is set, its value, rounded up to 512 or down\n to a multiple of 512, will be used as the block size\n in bytes by the \u{1b}[1m-l\u{1b}[0m and \u{1b}[1m-s\u{1b}[0m options. See \u{1b}[4mThe\u{1b}[24m \u{1b}[4mLong\u{1b}[24m\n \u{1b}[4mFormat\u{1b}[24m subsection for more information.\n\n CLICOLOR Use ANSI color sequences to distinguish file types.\n See LSCOLORS below. In addition to the file types\n mentioned in the \u{1b}[1m-F\u{1b}[0m option some extra attributes\n (setuid bit set, etc.) are also displayed. The\n colorization is dependent on a terminal type with the\n proper termcap(5) capabilities. The default “cons25”\n console has the proper capabilities, but to display\n the colors in an xterm(1), for example, the TERM\n variable must be set to “xterm-color”. Other\n terminal types may require similar adjustments.\n Colorization is silently disabled if the output is\n not directed to a terminal unless the CLICOLOR_FORCE\n variable is defined or \u{1b}[1m--color\u{1b}[0m is set to “always”.\n\n CLICOLOR_FORCE Color sequences are normally disabled if the output\n is not directed to a terminal. This can be\n overridden by setting this variable. The TERM\n variable still needs to reference a color capable\n terminal however otherwise it is not possible to\n determine which color sequences to use.\n\n COLORTERM See description for CLICOLOR above.\n\n COLUMNS If this variable contains a string representing a\n decimal integer, it is used as the column position\n width for displaying multiple-text-column output.\n The \u{1b}[1mls\u{1b}[0m utility calculates how many pathname text\n columns to display based on the width provided. (See\n \u{1b}[1m-C\u{1b}[0m and \u{1b}[1m-x\u{1b}[0m.)\n\n LANG The locale to use when determining the order of day\n and month in the long \u{1b}[1m-l\u{1b}[0m format output. See\n environ(7) for more information.\n\n LSCOLORS The value of this variable describes what color to\n use for which attribute when colors are enabled with\n CLICOLOR or COLORTERM. This string is a\n concatenation of pairs of the format \u{1b}[4mfb\u{1b}[24m, where \u{1b}[4mf\u{1b}[24m is\n the foreground color and \u{1b}[4mb\u{1b}[24m is the background color.\n\n The color designators are as follows:\n\n \u{1b}[1ma\u{1b}[0m black\n \u{1b}[1mb\u{1b}[0m red\n \u{1b}[1mc\u{1b}[0m green\n \u{1b}[1md\u{1b}[0m brown\n \u{1b}[1me\u{1b}[0m blue\n \u{1b}[1mf\u{1b}[0m magenta\n \u{1b}[1mg\u{1b}[0m cyan\n \u{1b}[1mh\u{1b}[0m light grey\n \u{1b}[1mA\u{1b}[0m bold black, usually shows up as dark grey\n \u{1b}[1mB\u{1b}[0m bold red\n \u{1b}[1mC\u{1b}[0m bold green\n \u{1b}[1mD\u{1b}[0m bold brown, usually shows up as yellow\n \u{1b}[1mE\u{1b}[0m bold blue\n \u{1b}[1mF\u{1b}[0m bold magenta\n \u{1b}[1mG\u{1b}[0m bold cyan\n \u{1b}[1mH\u{1b}[0m bold light grey; looks like bright white\n \u{1b}[1mx\u{1b}[0m default foreground or background\n\n Note that the above are standard ANSI colors. The\n actual display may differ depending on the color\n capabilities of the terminal in use.\n\n The order of the attributes are as follows:\n\n 1. directory\n 2. symbolic link\n 3. socket\n 4. pipe\n 5. executable\n 6. block special\n 7. character special\n 8. executable with setuid bit set\n 9. executable with setgid bit set\n 10. directory writable to others, with sticky\n bit\n 11. directory writable to others, without\n sticky bit\n 12. dataless file\n\n The default is \"exfxcxdxbxegedabagacadah\", i.e., blue\n foreground and default background for regular\n directories, black foreground and red background for\n setuid executables, etc.\n\n LS_COLWIDTHS If this variable is set, it is considered to be a\n colon-delimited list of minimum column widths.\n Unreasonable and insufficient widths are ignored\n (thus zero signifies a dynamically sized column).\n Not all columns have changeable widths. The fields\n are, in order: inode, block count, number of links,\n user name, group name, flags, file size, file name.\n\n LS_SAMESORT If this variable is set, the \u{1b}[1m-t\u{1b}[0m option sorts the\n names of files with the same modification timestamp\n in the same sense as the time sort. See the\n description of the \u{1b}[1m-t\u{1b}[0m option for more details.\n\n TERM The CLICOLOR and COLORTERM functionality depends on a\n terminal type with color capabilities.\n\n TZ The timezone to use when displaying dates. See\n environ(7) for more information.\n\n\u{1b}[1mEXIT\u{1b}[0m \u{1b}[1mSTATUS\u{1b}[0m\n The \u{1b}[1mls\u{1b}[0m utility exits\u{a0}0 on success, and\u{a0}>0 if an error occurs.\n\n\u{1b}[1mEXAMPLES\u{1b}[0m\n List the contents of the current working directory in long format:\n\n $ ls -l\n\n In addition to listing the contents of the current working directory in\n long format, show inode numbers, file flags (see chflags(1)), and suffix\n each filename with a symbol representing its file type:\n\n $ ls -lioF\n\n List the files in \u{1b}[4m/var/log\u{1b}[24m, sorting the output such that the most\n recently modified entries are printed first:\n\n $ ls -lt /var/log\n\n\u{1b}[1mCOMPATIBILITY\u{1b}[0m\n The group field is now automatically included in the long listing for\n files in order to be compatible with the IEEE Std 1003.2 (“POSIX.2”)\n specification.\n\n\u{1b}[1mLEGACY\u{1b}[0m \u{1b}[1mDESCRIPTION\u{1b}[0m\n In legacy mode, the \u{1b}[1m-f\u{1b}[0m option does not turn on the \u{1b}[1m-a\u{1b}[0m option and the \u{1b}[1m-g\u{1b}[0m,\n \u{1b}[1m-n\u{1b}[0m, and \u{1b}[1m-o\u{1b}[0m options do not turn on the \u{1b}[1m-l\u{1b}[0m option.\n\n Also, the \u{1b}[1m-o\u{1b}[0m option causes the file flags to be included in a long (-l)\n output; there is no \u{1b}[1m-O\u{1b}[0m option.\n\n When \u{1b}[1m-H\u{1b}[0m is specified (and not overridden by \u{1b}[1m-L\u{1b}[0m or \u{1b}[1m-P\u{1b}[0m) and a file argument\n is a symlink that resolves to a non-directory file, the output will\n reflect the nature of the link, rather than that of the file. In legacy\n operation, the output will describe the file.\n\n For more information about legacy mode, see compat(5).\n\n\u{1b}[1mSEE\u{1b}[0m \u{1b}[1mALSO\u{1b}[0m\n chflags(1), chmod(1), sort(1), xterm(1), localeconv(3), strftime(3),\n strmode(3), compat(5), termcap(5), sticky(7), symlink(7)\n\n\u{1b}[1mSTANDARDS\u{1b}[0m\n With the exception of options \u{1b}[1m-g\u{1b}[0m, \u{1b}[1m-n\u{1b}[0m and \u{1b}[1m-o\u{1b}[0m, the \u{1b}[1mls\u{1b}[0m utility conforms to\n IEEE Std 1003.1-2001 (“POSIX.1”) and IEEE Std 1003.1-2008 (“POSIX.1”).\n The options \u{1b}[1m-B\u{1b}[0m, \u{1b}[1m-D\u{1b}[0m, \u{1b}[1m-G\u{1b}[0m, \u{1b}[1m-I\u{1b}[0m, \u{1b}[1m-T\u{1b}[0m, \u{1b}[1m-U\u{1b}[0m, \u{1b}[1m-W\u{1b}[0m, \u{1b}[1m-Z\u{1b}[0m, \u{1b}[1m-b\u{1b}[0m, \u{1b}[1m-h\u{1b}[0m, \u{1b}[1m-w\u{1b}[0m, \u{1b}[1m-y\u{1b}[0m and \u{1b}[1m-\u{1b}[0m, are\n non-standard extensions.\n\n The ACL support is compatible with IEEE Std\u{a0}1003.2c (“POSIX.2c”) Draft\u{a0}17\n (withdrawn).\n\n\u{1b}[1mHISTORY\u{1b}[0m\n An \u{1b}[1mls\u{1b}[0m command appeared in Version\u{a0}1 AT&T UNIX.\n\n\u{1b}[1mBUGS\u{1b}[0m\n To maintain backward compatibility, the relationships between the many\n options are quite complex.\n\n The exception mentioned in the \u{1b}[1m-s\u{1b}[0m option description might be a feature\n that was based on the fact that single-column output usually goes to\n something other than a terminal. It is debatable whether this is a\n design bug.\n\n IEEE Std 1003.2 (“POSIX.2”) mandates opposite sort orders for files with\n the same timestamp when sorting with the \u{1b}[1m-t\u{1b}[0m option.\n\nmacOS 26.3 August 31, 2020 macOS 26.3\n" |

What It Does
Extend the example suitcase with a man-page picker modeled after the Telescope Neovim plugin. You can scroll through a list of results filtered by a prompt and preview the man page in a third pane.
Also adds aborder_titlekey toViewPropsfor rendering a string overlay centered at either bottom or top border.Related Issues
#13
Depends on #145