Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support right_format in nushell #3982

Closed
zbraniecki opened this issue May 12, 2022 · 1 comment · Fixed by #4490 or #4485 · May be fixed by #4208
Closed

Support right_format in nushell #3982

zbraniecki opened this issue May 12, 2022 · 1 comment · Fixed by #4490 or #4485 · May be fixed by #4208
Labels
✨ enhancement A new feature implementation. 🌊 upstream Depends on an upstream solve beyond starship

Comments

@zbraniecki
Copy link

Nushell supports dual input (left and right side), but when switching to starship I can't use it.

For example, this cannot be recreated in starship because the date/time cannot be displayed on the right in Nushell:

Screen Shot 2022-05-12 at 8 59 36 AM

@zbraniecki zbraniecki added the ✨ enhancement A new feature implementation. label May 12, 2022
@davidkna
Copy link
Member

davidkna commented May 12, 2022

See also nushell/nushell#4909 on why starship does not enable right prompt with nushell by default.

In your specific case, because your prompt is single-line, this might work for you:

let-env PROMPT_COMMAND_RIGHT = {
    let width = (term size -c | get columns | into string)
    starship prompt --right $"--cmd-duration=($env.CMD_DURATION_MS)" $"--status=($env.LAST_EXIT_CODE)" $"--terminal-width=($width)"
}

Warning: This snippet may need to be updated as nushell and starship evolve.

#3177 may also solve this.

@davidkna davidkna added the 🌊 upstream Depends on an upstream solve beyond starship label May 12, 2022
nibon7 added a commit to nibon7/starship that referenced this issue Oct 22, 2022
nibon7 added a commit to nibon7/starship that referenced this issue Oct 22, 2022
nibon7 added a commit to nibon7/starship that referenced this issue Nov 28, 2022
nibon7 added a commit to nibon7/starship that referenced this issue Nov 28, 2022
davidkna pushed a commit that referenced this issue Dec 2, 2022
Indyandie pushed a commit to Indyandie/starship that referenced this issue Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment