Git Product home page Git Product logo

Comments (2)

0rax avatar 0rax commented on May 23, 2024

Hello @MattSturgeon, this seems to be some kind of undefined behaviour in those untested environments. Fishline tries to detect if it is running under a tty (see https://github.com/0rax/fishline/blob/master/conf.d/fishline-init.fish#L15-L25) and load the fallback theme (the one without arrows) there as power-line glyphs are usually not available in this context.

You can check if this is the case by running tty | grep tty if something is shown here, the tty compatible symbols will be loaded.

You should be able to force the default glyphs to be used manually by adding the following line after fishline is initialized:

source $PATH_TO_FISHLINE/conf.d/fishline-themes/default_symbols.fish

Depending on how you installed it, this can be done by adding to your configuration:

if status is-interactive
    set FLINE_PATH $HOME/.config/fish/fishline
    source $FLINE_PATH/init.fish
	source $FLINE_PATH/conf.d/fishline-themes/default_symbols.fish
end

If you have installed it using fisher, creating a fishline-theme.fish file with the following line should work:

source ~/.config/fish/conf.d/fishline-themes/default_symbols.fish

Let me know if you can confirm that tty | grep tty does indeed return something and/or if any of my proposed fixes works. I will try to replicate the issue in a VM on my end and update my TTY detection routine though I might just remove it and let the user add it themselves if they want it / document it properly.

Hope this helps

from fishline.

MattSturgeon avatar MattSturgeon commented on May 23, 2024

I believe I also noticed similar behaviour on windows (msys2 and wsl2), but will need to double check next time I'm on a windows machine.

Looks like I mis-remembered this part. Checked on windows and it appears unaffected. At least in Windows Terminal.

You can check if this is the case by running tty | grep tty if something is shown here, the tty compatible symbols will be loaded.

The two flatpak terminals print not a tty (and exit 1, but grep changes exit code to 0)

image

EDIT: didn't check, but tty is probably printing not a tty to stderr, so might also help to only capture stdout. nope, prints to stdout

Perhaps run ttty, check its exit code and then grep its stdout?

If you have installed it using fisher, creating a fishline-theme.fish file with the following line should work:

source ~/.config/fish/conf.d/fishline-themes/default_symbols.fish

image

This works... Thanks! Although the colouring is different - guessing that's a theming issue rather than an environment/fishline issue? 🤔 EDIT: looks like maybe an issue with sourcing stuff in the wrong order? Doesn't occur with my PR.

Hope this helps

Definitely, thanks

from fishline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.