mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
fix(fill): Add terminal-width argument to explicitly define terminal's width (#3090)
Add `terminal-width` argument to explicitly define terminal's width Update pwsh,bash,zsh,fish init scripts with `terminal-width` argument Co-authored-by: Kevin Song <chips@ksong.dev> Co-authored-by: Kevin Song <4605384+chipbuster@users.noreply.github.com>
This commit is contained in:
+11
@@ -30,6 +30,13 @@ fn main() {
|
||||
.long_help("Bash and Zsh supports returning codes for each process in a pipeline.")
|
||||
.multiple(true);
|
||||
|
||||
let terminal_width_arg = Arg::with_name("terminal_width")
|
||||
.short("w")
|
||||
.long("terminal-width")
|
||||
.value_name("TERMINAL_WIDTH")
|
||||
.help("The width of the current interactive terminal.")
|
||||
.takes_value(true);
|
||||
|
||||
let path_arg = Arg::with_name("path")
|
||||
.short("p")
|
||||
.long("path")
|
||||
@@ -107,6 +114,7 @@ fn main() {
|
||||
)
|
||||
.arg(&status_code_arg)
|
||||
.arg(&pipestatus_arg)
|
||||
.arg(&terminal_width_arg)
|
||||
.arg(&path_arg)
|
||||
.arg(&logical_path_arg)
|
||||
.arg(&cmd_duration_arg)
|
||||
@@ -130,6 +138,7 @@ fn main() {
|
||||
)
|
||||
.arg(&status_code_arg)
|
||||
.arg(&pipestatus_arg)
|
||||
.arg(&terminal_width_arg)
|
||||
.arg(&path_arg)
|
||||
.arg(&logical_path_arg)
|
||||
.arg(&cmd_duration_arg)
|
||||
@@ -187,6 +196,7 @@ fn main() {
|
||||
.about("Explains the currently showing modules")
|
||||
.arg(&status_code_arg)
|
||||
.arg(&pipestatus_arg)
|
||||
.arg(&terminal_width_arg)
|
||||
.arg(&path_arg)
|
||||
.arg(&logical_path_arg)
|
||||
.arg(&cmd_duration_arg)
|
||||
@@ -198,6 +208,7 @@ fn main() {
|
||||
.about("Prints timings of all active modules")
|
||||
.arg(&status_code_arg)
|
||||
.arg(&pipestatus_arg)
|
||||
.arg(&terminal_width_arg)
|
||||
.arg(&path_arg)
|
||||
.arg(&logical_path_arg)
|
||||
.arg(&cmd_duration_arg)
|
||||
|
||||
Reference in New Issue
Block a user