Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need a way to start fish without configuration #4891

Closed
jorda0mega opened this issue Apr 10, 2018 · 7 comments
Closed

need a way to start fish without configuration #4891

jorda0mega opened this issue Apr 10, 2018 · 7 comments

Comments

@jorda0mega
Copy link

jorda0mega commented Apr 10, 2018

I am unable to use the fish shell because during the last upgrade some of the configuration files got corrupted. As you can see below, I am unable to execute any command because I get an error when doing so. Typically I would modify the files with the errors and source them so the new content is loaded but I can't even do that because I cannot execute source. Is there a way to start the shell without any configuration? Is there a possible workaround? #3288

screen shot 2018-04-10 at 10 26 18 am

@faho
Copy link
Member

faho commented Apr 10, 2018

Typically I would modify the files with the errors and source them so the new content is loaded but I can't even do that because I cannot execute source.

You really can't execute anything? What happens when you do vi<RETURN> (or any other editor)?


The obvious workaround is to open your config file in some other way - you've got a graphical session running, so edit ~/.config/fish/config.fish in a graphical editor. Then close your terminal session and open a new one.

Now, as to providing a "--norc" option: I've softened a bit since #3288. We could probably add it, though for internal reasons it would still have to read /usr/share/fish/config.fish (which isn't so much a config file as initialization).

@Darkshadow2
Copy link
Contributor

I ran into a similar situation a while ago when __fish_datadir was renamed to __fish_data_dir. I have all of my custom scripts in a git repo, and decided a while ago to create my own autoload and conf.d dirs inside it, and created a script to load from those, which is placed in __fish_sysconf_dir/conf.d. It does this for the autoload:

set fish_function_path[-1] $git_path/autoload
set fish_function_path $fish_function_path $__fish_data_dir/functions

...which before I renamed it was __fish_datadir. Of course, when the name changed, it meant that the default fish functions were not in the path, and caused fish to just lock up. I couldn't even type anything. It just sat there after spewing a lot of lines about unknown commands.

So, if you add a --norc flag, could it also skip loading anything from any of the conf.d dirs?

@jorda0mega
Copy link
Author

@faho any command simply results in "fish: Unknown command '__budspencer_preexec'" like in that last line of the screenshot. I also tried modifying the config files but the changes are not getting picked up (maybe I need to source them but that too will result in the unknown command error). I've tried restarting my terminal and machine to see if the config changes get picked up but nothing. I'm pretty sure I'm missing something but can't figure out what. At this point I think my best bet would be to uninstall and reinstall.

@faho
Copy link
Member

faho commented Apr 13, 2018

any command simply results in "fish: Unknown command '__budspencer_preexec'"

@jorda0mega: The budspencer theme rebinds \r! 🤦‍♂️

Which means you're never actually executing anything.

You need to solve that before you can actually execute anything, which probably means uninstalling that "theme", or at least its keybindings.


So, if you add a --norc flag, could it also skip loading anything from any of the conf.d dirs?

@Darkshadow2: Sure.

@jorda0mega
Copy link
Author

jorda0mega commented Apr 13, 2018

@faho yup. I noticed the budspencer theme has been outdated for quite a while and broke with the new update. I was able to fix my issue by uninstalling and installing another theme. I can close this issue but still would be nice to have a no config option of starting the shell (not sure if you want to keep open to track that). Thanks a bunch for the timely replies, really appreciate it!

@mqudsi
Copy link
Contributor

mqudsi commented Apr 14, 2018

fwiw, budspencer should use fish's event mechanism (unless it wants to determine whether a command is invoked or not which fish's event mechanism does not support as it is a unidirectional notification).

@faho
Copy link
Member

faho commented May 13, 2018

This was already proposed in #1256, closing as a duplicate.

@faho faho closed this as completed May 13, 2018
@faho faho added the duplicate label May 13, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants