💾 Archived View for bbs.geminispace.org › u › Nono › 11495 captured on 2023-11-14 at 09:28:57. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2023-12-28)

-=-=-=-=-=-=-

Comment by 😺 Nono

Re: "Newsboat RSS reader acting weird"

In: s/Linux

Hi @clseibold: I use Micro as a text editor... I'll explore the documentation for Fish, but I don't understand what "environment" means in this context... Is it just a generic name for a text editor? Thanks, and sorry if this all sounds a little trivial!

😺 Nono

Nov 05 · 9 days ago

7 Later Comments ↓

🍵 michaelnordmeyer · Nov 05 at 11:17:

Environment means in this case the shell evaluation configuration. I never tried Fish, but other shells display theirs when executing `env` in the shell. Apparently Fish uses `set -gx`.

`set -gx EDITOR micro` should set the default editor to Micro permanently and apply it immediately to your current shell environment. Other opened Fish shells have to either source the config again (~/.config/fish/config.fish) or to be restarted. Apps relying on the EDITOR variable might have to be restarted as well to apply the new setting.

— https://fishshell.com/docs/current/cmds/set.html

— https://fishshell.com/docs/current/cmds/source.html

👤 AnoikisNomads · Nov 05 at 11:53:

@nono environment in this content just means setting up default... like which program to use to open URLs, Mails, or in this content, config files.

😺 Nono · Nov 05 at 12:21:

Thank you guys for all the help!

I have to admit, I didn't understand all of what was written in the links to the documentation for Fish, but with the answers provided here, it does work now, even after restarting! Thanks again!

🚀 clseibold · Nov 05 at 22:30:

@Nono Ah, sorry. Let me start from the beginning, with environments in Unix/Linux. So, when you open a shell, it has what is called an "environment" that is just a bunch of user configuration, basically. You can think of it like a bunch of labels with values associated. So the EDITOR label might have the value "Micro". When a program queries for this EDITOR label, it can look at the value you associated with it ("Micro") and use that as your editor (by opening that program up). These labels are basically variables with values associated with them.

When you open a new program in the shell, this environment is "copied" to the program. So, if you have EDITOR set in the shell, then every program you open in the shell will have this EDITOR variable set. If you open a program in the shell, and that program opens another program, this EDITOR variable stays there. This means any variables set propagate downward.

Let us say you open a program from the shell, and that program sets a new environment variable, a new label with a value, called X. This variable does *not* propagate *upwards*. The shell will not know of this variable. But, it *will* still propagate downwards, which means if the program opens another program, that other program will know about the variable X.

So, to summarize, an environment is a list of labels with values, called "environment variables". All variables propagate downward from where they were first set, when a program is opened by another program, but they do not propagate upward.

When you set this EDITOR variable in the config file, the shell will open up and then will call this config file, which will set the environment variables. These variables will now propagate down to all the programs you open up with the shell in that session of the shell.

While this last thing isn't too important, it is good to know, which is that changes to the values of variables also propagate downward only, but not upward. If a program ends up changing the EDITOR variable, it will only affect that program and any program it opens up. It will not propagate upwards and will therefore not affect all programs.

😺 Nono · Nov 06 at 00:08:

@clseibold: Very clear and informative! Thank you very much!

🍭 jmjl · Nov 06 at 17:44:

They have to be restarted but with the new enviroment loaded, as most programs usually don't try to detect the shell you're using and set a inotify to add new enviroment variables, so new variables won't apply, (unless you go weird routes like adding the variable into environ manually to each process)

— I'm replying to this comment specifically, and bubble doesn't make that clear.

😺 Nono · Nov 06 at 18:29:

@jmjl: I just specified it in the right config file, and now it works fine

Original Post

🌒 s/Linux

Newsboat RSS reader acting weird — Hi there! Any Newsboat users here? I'm trying to force myself to learn how to use the Terminal, and Newsboat is the first app I installed... But there's a command that doesn't seem to work... Hitting Shift + E is supposed to open the urls file in a text editor, but nothing happens... As I'm very new to all of this, I have no idea what I should be looking for in order to fix this... Any ideas please? I'm on an Ubuntu based machine... Thank you in advance....

💬 Nono · 13 comments · Nov 04 · 10 days ago