💾 Archived View for bbs.geminispace.org › u › Nono › 11491 captured on 2023-12-28 at 16:33:50. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-11-14)
-=-=-=-=-=-=-
Re: "Newsboat RSS reader acting weird"
Hi @jdcard: When I quit Newsboat, I did notice the following error message in the shell:
"sh: 1: vi: not found"
However, in your response, you mention a file named .bashrc. I'm using the Fish shell because it is said to be friendly to beginners. Will your response work if I'm not on Bash?
I know I should just try it and see what it does, but I'm afraid I'll break it all... That's why I'm asking for more info first... Thanks!
Nov 05 · 8 weeks ago
@clseibold: Heheheee... So true! ^^
🚀 clseibold · Nov 05 at 08:57:
@Nono Ah, so the fallback it uses isn't even installed on your system, lol. A simple fix would be to get vi installed. However, you might not want to use vi (it's a bit meh, and has a steep learning curve for beginners).
For fish, fish will have its own config file where you define environment variables. I believe the config is in `~/.config/fish/config.fish`, according to a Stack Overflow answer, but that might not be accurate, I'm not sure. You might want to look at the Fish shell documentation for setting an environment variable (afaik, it's the `set` command).
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!
🍵 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.
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.
@clseibold: Very clear and informative! Thank you very much!
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.
@jmjl: I just specified it in the right config file, and now it works fine
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....