Fix term width for the table (#346)

This commit is contained in:
JT 2021-11-18 18:48:15 +13:00 committed by GitHub
parent f8f437b060
commit 96bdcc4ff7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 3 deletions

23
TODO.md
View file

@ -36,17 +36,36 @@
- [x] operator overflow
- [x] Support for `$in`
- [x] config system
- [x] plugins
- [ ] external plugin signatures
- [ ] external command signatures
- [ ] shells
- [ ] autoenv
- [ ] plugins
- [ ] dataframes
- [ ] overlays (replacement for `autoenv`), adding modules to shells
- [ ] port over `which` logic
- [ ] port test support crate so we can test against sample files, including multiple inputs into the CLI
- [ ] benchmarking
- [ ] finish adding config properties
- [ ] system-agnostic test cases
- [ ] exit codes
- [ ] length of time the command runs put in the env (CMD_DURATION_MS)
## Post-nushell merge:
- [ ] Overlays (replacement for `autoenv`), adding modules to shells
- [ ] Input/output types
- [ ] let [first, rest] = [1, 2, 3] (design question: how do you pattern match a table?)
## Maybe:
- [ ] default param values?
- [ ] Unary not?
module git {
external fn "git clone" [
arg: int,
--flag: string(custom-completion), ????
] ;
}
plugin git { ... }

View file

@ -37,7 +37,7 @@ impl Command for Table {
let config = stack.get_config()?;
let term_width = if let Some((Width(w), Height(_h))) = terminal_size::terminal_size() {
w as usize
(w - 1) as usize
} else {
80usize
};