function fish_greeting
set_color red
echo -n "THINK"
set_color cyan
echo -n "4"
set_color magenta
echo -n "YOURSELF"
set_color blue
echo -n "Question"
set_color yellow
echo "Authority"
end
fastfetch
alias home "cd ~"
set -gx EDITOR gedit
set -gx GIT_EDITOR gedit
why won’t it open my config.fish file with gedit? it keeps using vim i think it is… i find that confusing and wanna keep it simple.
What “keeps opening” vim ?
If you were opening something from the terminal you would often just use the command of the program you want to use; ex micro somefile.
What action is performed to open ‘config.fish’ ?
PS.
If this means your shell configuration file .. this will only affect things you do in the terminal.
IE: These things, like setting those variables, only happens when you start your terminal emulator program.
A. You should never launch a GUI program with root/sudo
B. The file referenced is in your $HOME and privilege-escalation should be avoided there
C. Many modern editors (kate, gedit, micro) have proper polkit implementation and so simply attempting to save a file to a protected path will prompt for a password. No special launching options or similar required.
Stop doing it that way.
I dont know too much about fish shell.
But it sounds like you probably want these variables to be global.
If so then put them in /etc/environment or ~/.config/environment.d/*
These files accept VAR=VAL entries, one per line.
PS.
Since sudo was mentioned.
You might want to set SUDO_EDITOR=/usr/bin/micro or similar and practice the use of sudoedit. With the env var set then you can just do;
sudoedit /path/to/some/file
This is easy to remember/do, is at least as secure as regular sudo, and affords extra safeties like not mangling permissions and working on a temporary file before applying changes.
it’s all good i am figuring it all out as i go along. i am actually having a complete BLAST learning about the fish shell! anyway back to editing my .config file… it is SO FUN! learning so much… HEHE
You should refrain from setting any GUI editor as (any of) the shell’s EDITOR(s), in my opinion. Better to learn the minimal command set of nano, micro or the like, I’m thinking.
Just think what would happen if your DE crashed and you’d have to work in a “real” shell, like using Ctrl+F2, or ssh’ing into your system? No DE at all. GUI editor specified? You’re doomed…
I never considered this but my mind was immediately blown when you said that. Not Good Errrr… I shall fix this tomorrow as my brain hurts to much from customizing stuff LRL
Good point purple friend! Thank you so much for bring this to my attention before I had a real BIG problem.
Hoping my system doesn’t crash in the mean time. Knowing my luck it will. Knock on wood.
Your right I better learn some minimal commands for nano or whatever. Right now I know none & that is obviously why I did what I did. Tomorrow I will attempt to teach myself some commands. Errr… Not looking forward to it but it is completely essential that I do. Hopefully I catch on to some of the basic commands… IDK I am not the sharpest tool in the shed when it comes to that kind of thing… though I really don’t have a choice.
( You know - by executing something like sudoedit /etc/environment. )
That file is global and is not sourced when a terminal is launched but when the system starts and accepts VAR=VAL lines .. which does not seem true for your fish terminal/config.
Credits go to @cscs — he said all the important things! I’m probably just bringing you off-track by digressing. Sorry, didn’t want to hijack the thread.