• What? (Was: bash prompt question)

    From Kenny McCormack@21:1/5 to damien.wyart@free.fr on Tue Sep 24 08:51:46 2024
    In article <66f2731d$0$3674$426a34cc@news.free.fr>,
    Damien Wyart <damien.wyart@free.fr> wrote:
    ...
    your prompt easily and in a powerful way, I advise the use of a framework prompt.

    What is a "framework prompt" ?

    --
    Christianity is not a religion.

    - Rick C Hodgin -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Damien Wyart@21:1/5 to All on Tue Sep 24 12:10:13 2024
    * gazelle@shell.xmission.com (Kenny McCormack) in comp.unix.shell:
    What is a "framework prompt" ?

    Sorry, wanted to write "(shell, not LLM) prompt framework" :)

    In addition to Starship, the main ones that come to mind are:
    - https://github.com/liquidprompt/liquidprompt
    - https://github.com/JanDeDobbeleer/oh-my-posh
    - https://github.com/b-ryan/powerline-shell (not active any more, it seems)
    - https://github.com/justjanne/powerline-go

    These two are also very well-known, but only work with zsh:
    - https://github.com/ohmyzsh/ohmyzsh (much wider scope than prompt, but
    customizing it is one the most visible features)
    - https://github.com/sindresorhus/pure

    I use zsh, so I tested most of them and I chose Starship as my daily driver.

    --
    DW

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Damien Wyart on Tue Sep 24 14:11:29 2024
    On 24.09.2024 12:10, Damien Wyart wrote:
    * gazelle@shell.xmission.com (Kenny McCormack) in comp.unix.shell:
    What is a "framework prompt" ?

    Sorry, wanted to write "(shell, not LLM) prompt framework" :)

    Fine. But what is a "framework prompt" (or a "(shell, not LLM)
    prompt framework" if you prefer that)? Since you're suggesting
    something (in context of something as simple as a shell prompt)
    that is obviously not commonly known, do you mind to explain?
    Preferably with a rationale or statement why it shall be used
    (as opposed to just defining prompt the usual and simple way).

    Janis, curious

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Axel Reichert@21:1/5 to Damien Wyart on Tue Sep 24 14:00:18 2024
    Damien Wyart <damien.wyart@free.fr> writes:

    * gazelle@shell.xmission.com (Kenny McCormack) in comp.unix.shell:
    What is a "framework prompt" ?

    Sorry, wanted to write "(shell, not LLM) prompt framework" :)

    In addition to Starship, the main ones that come to mind are:
    - https://github.com/liquidprompt/liquidprompt
    - https://github.com/JanDeDobbeleer/oh-my-posh
    - https://github.com/b-ryan/powerline-shell (not active any more, it seems) - https://github.com/justjanne/powerline-go

    Thanks for the links. I had a quick glance at Starship and found that it
    needs to be installed (in contrast to the prompt generator website
    mentioned else-thread) and seems to have its own configuration language
    (which needs to be learned).

    From my home user's point of view this feels like a whole lot of effort
    for something that at least for me is something that I configure once
    and then do not touch it for years (likewise I do not do shell-hopping).

    Could you please elaborate on your use cases and why you think the IMHO considerable overhead is worthwhile for you?

    Best regards

    Axel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to damien.wyart@free.fr on Tue Sep 24 12:02:14 2024
    In article <66f29006$0$3283$426a74cc@news.free.fr>,
    Damien Wyart <damien.wyart@free.fr> wrote:
    ...
    Sorry, wanted to write "(shell, not LLM) prompt framework" :)

    What is a "(shell, not LLM) prompt framework" ?

    --
    Modern Conservative: Someone who can take time out from demanding more
    flag burning laws, more abortion laws, more drug laws, more obscenity
    laws, and more police authority to make warrantless arrests to remind
    us that we need to "get the government off our backs".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Damien Wyart@21:1/5 to All on Wed Sep 25 10:53:20 2024
    I have some NNTP issues (I can see much more articles on the public read-only server I use than on the other one I use to post) ; I almost never post nowadays
    and Usenet is really extremely niche now, so I do not want to invest time on fixing...

    I will still answer very quickly to this even if I vaguely feel a trollish tone:

    Fine. But what is a "framework prompt" (or a "(shell, not LLM)
    prompt framework" if you prefer that)? Since you're suggesting
    something (in context of something as simple as a shell prompt)
    that is obviously not commonly known, do you mind to explain?
    Preferably with a rationale or statement why it shall be used
    (as opposed to just defining prompt the usual and simple way).

    I'm not interested in bike-shedding on words, we can call them prompt tools or whatever, I don't care.

    "not commonly known" might be true in this newsgroup, but if we look at the "Github stars" for all the projects I quoted (yes, I know, this metric is not perfect and can be criticized), they sum up to about 235000, so these projects clearly have users.

    If you have a quick look at the tools (why would the whole "evidence" be on my side?), what they have in common is:
    - they provide much more pieces of info you can choose to display (see right
    column on https://starship.rs/config/) and, importantly, to not display if they
    are not relevant to you
    - this info is dynamic and comes from many sources unknown from the shell itself
    - they are contextual: the display depends on the current directory and its
    content
    - they can be configured in much details and you do not need to fiddle with ANSI
    codes to add colors, for example.


    I will stop here on this whole topic, if people hate external prompt tools, they
    are free to not use them.

    --
    DW

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Damien Wyart@21:1/5 to All on Wed Sep 25 10:33:50 2024
    These two are also very well-known, but only work with zsh:
    - https://github.com/ohmyzsh/ohmyzsh (much wider scope than prompt, but
    customizing it is one the most visible features)
    - https://github.com/sindresorhus/pure

    Just for the reference and to be more complete, I will add this one to the list:
    https://github.com/spaceship-prompt/spaceship-prompt

    also quite well known and which inspired Starship which was initially a rewrite in
    a compiled langage to make execution much faster.

    --
    DW

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Damien Wyart on Wed Sep 25 19:28:40 2024
    On 25.09.2024 10:53, Damien Wyart wrote:
    I have some NNTP issues (I can see much more articles on the public read-only server I use than on the other one I use to post) ; I almost never post nowadays
    and Usenet is really extremely niche now, so I do not want to invest time on fixing...

    I will still answer very quickly to this even if I vaguely feel a trollish tone:

    Fine. But what is a "framework prompt" (or a "(shell, not LLM)
    prompt framework" if you prefer that)? Since you're suggesting
    something (in context of something as simple as a shell prompt)
    that is obviously not commonly known, do you mind to explain?
    Preferably with a rationale or statement why it shall be used
    (as opposed to just defining prompt the usual and simple way).

    I'm not interested in bike-shedding on words, we can call them prompt tools or
    whatever, I don't care.

    "not commonly known" might be true in this newsgroup, but if we look at the "Github stars" for all the projects I quoted (yes, I know, this metric is not perfect and can be criticized), they sum up to about 235000, so these projects
    clearly have users.

    If you have a quick look at the tools (why would the whole "evidence" be on my
    side?), what they have in common is:
    - they provide much more pieces of info you can choose to display (see right
    column on https://starship.rs/config/) and, importantly, to not display if they
    are not relevant to you
    - this info is dynamic and comes from many sources unknown from the shell itself
    - they are contextual: the display depends on the current directory and its
    content
    - they can be configured in much details and you do not need to fiddle with ANSI
    codes to add colors, for example.


    I will stop here on this whole topic, if people hate external prompt tools, they
    are free to not use them.

    With this belligerent stance (that obviously blurred your perception)
    you seem to have completely missed the intent of the various responses
    to your post, despite they were coherent across the posts and should
    in their own individual ways of expression have been quite clear.

    It was not about finding a fitting word for the software package.
    It was not about click-rate or download statistics of that tool.
    It was not about emotions towards the tool (fans/you vs. haters).

    It was simply about what that package is supposed to do.
    And why it's worth to install and use that huge package.

    From all the posts (yours and other responses) I guess that you have
    to install a (huge) package to introduce a layer between you and your
    shell, that all input and output gets intercepted and transformed in
    ways that can be controlled by an enormously large configuration file.
    [ Such sort of an answer I would have hoped to get from you to shed
    some light on the questions, along with some application examples
    to better understand your decision why you prefer to use the tool.]

    Personally, I generally try to avoid dependencies, especially to such voluminous packages with questionable utility and unknown reliability
    and potential interference to my environment. I prefer using standard environments as much as possible and sensible, to be able to work the
    same way when switching to other environments. Using e.g. ANSI codes
    (if sensible) is no burden for me, certainly not more than learning a
    software package and its extensive configuration options. (YMMV.)

    Janis

    PS: *If* the package is effectively an intercepting layer I wonder
    how it will pass functions that I use in my shell (e.g. Vi Editing
    Mode) to the shell. Note: this is just of academic interest to me,
    so don't bother. But I suspect you're probably anyway not the right
    person here to answer that, so I put it just in the post scriptum.
    But, if I mis-assessed, feel free to enlighten us with some facts.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Damien Wyart@21:1/5 to All on Wed Sep 25 21:41:16 2024
    From all the posts (yours and other responses) I guess that you have to install
    a (huge) package to introduce a layer between you and your shell, that all input
    and output gets intercepted and transformed

    No.

    PS: *If* the package is effectively an intercepting layer I wonder how it will
    pass functions that I use in my shell (e.g. Vi Editing Mode) to the shell.

    I will only answer for Starship (I did not study the other tools deeply) and bash
    (quite "standard"): Starship only relies on PROMPT_COMMAND, PS0, PS1 and PS2, so
    once its prompt displaying is done, the shell is normal and gets its input as usual. Same for the output of commands, it doesn't goes through Starship itself.

    --
    DW

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)