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] operator overflow
- [x] Support for `$in` - [x] Support for `$in`
- [x] config system - [x] config system
- [x] plugins
- [ ] external plugin signatures
- [ ] external command signatures
- [ ] shells - [ ] shells
- [ ] autoenv - [ ] autoenv
- [ ] plugins
- [ ] dataframes - [ ] dataframes
- [ ] overlays (replacement for `autoenv`), adding modules to shells
- [ ] port over `which` logic - [ ] 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: ## Post-nushell merge:
- [ ] Overlays (replacement for `autoenv`), adding modules to shells
- [ ] Input/output types - [ ] Input/output types
- [ ] let [first, rest] = [1, 2, 3] (design question: how do you pattern match a table?) - [ ] let [first, rest] = [1, 2, 3] (design question: how do you pattern match a table?)
## Maybe: ## Maybe:
- [ ] default param values? - [ ] default param values?
- [ ] Unary not? - [ ] 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 config = stack.get_config()?;
let term_width = if let Some((Width(w), Height(_h))) = terminal_size::terminal_size() { let term_width = if let Some((Width(w), Height(_h))) = terminal_size::terminal_size() {
w as usize (w - 1) as usize
} else { } else {
80usize 80usize
}; };