You are not logged in.

#1 2024-02-24 14:54:18

jomo_G
Member
From: Edmonton
Registered: 2023-11-07
Posts: 12

[Solved] Alacritty auto detects file's programming language

so recently I downloaded alacritty on my new PC which has an arch on it. When I used the same configuration file from my old laptop, something weird happened. On my old laptop, alacritty will display "via <a programming langugage> <language version>" if there is a coding file. Say for example, I have a file called "something.py", when in that directory, it will display the current directory as usual along with "via Python 3.11". On my new pc, this did not happen. Just wondering if there is a way for me to fix this?

Any help would be much appreciated.

PS: Old laptop also runs an arch.

Last edited by jomo_G (2024-02-24 15:22:11)

Offline

#2 2024-02-24 15:06:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,569

Re: [Solved] Alacritty auto detects file's programming language

That's probably more a feature of your shell/prompt?
You might want to link an illustrating picture, though, to get others an idea what you're talking about.

Offline

#3 2024-02-24 15:12:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: [Solved] Alacritty auto detects file's programming language

I agree it sounds like part of a prompt (PS1 or PROMPT_COMMAND).  But it's also a very odd idea.  What does it do / what is it supposed to do, when there are multiple "coding" files in a directory?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2024-02-24 15:15:21

jomo_G
Member
From: Edmonton
Registered: 2023-11-07
Posts: 12

Re: [Solved] Alacritty auto detects file's programming language

Here is the link
https://imgur.com/a/7ZW5zOF

Offline

#5 2024-02-24 15:20:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,569

Re: [Solved] Alacritty auto detects file's programming language

https://archlinux.org/packages/extra/x86_64/scrot/
That's your prompt - it has a duck in it. That didn't just happen.
You'll have to check your shell config on that system.

Offline

#6 2024-02-24 15:21:45

jomo_G
Member
From: Edmonton
Registered: 2023-11-07
Posts: 12

Re: [Solved] Alacritty auto detects file's programming language

seth wrote:

https://archlinux.org/packages/extra/x86_64/scrot/
That's your prompt - it has a duck in it. That didn't just happen.
You'll have to check your shell config on that system.

Thank you

Offline

#7 2024-02-24 23:20:02

jomo_G
Member
From: Edmonton
Registered: 2023-11-07
Posts: 12

Re: [Solved] Alacritty auto detects file's programming language

To everyone interested in how I managed to set this up, I did a bit digging on my old laptop, turns out there is something fishy in my shell configuration file. There is an extra line of code in my ~/.bashrc file:

eval "$(starship init bash)"

so yeah as Seth said, my shell configuration file seems to be full of surprises.

Last edited by jomo_G (2024-02-24 23:20:39)

Offline

Board footer

Powered by FluxBB