Git is slow / themes are slow / cd
is slow
Quite a few OMF themes show Git repository information in their prompts, which requires the theme to run one or more Git commands to query repo information. If this operation takes a long time, then the theme can also take a logn time to draw the prompt and overall the shell will feel very slow.
There are multiple reasons why this can happen: you have huge Git repos, running over a slow file system, or even Windows-specific Git issues.
Everything is broken on Windows
There are many different flavors of Git the can be installed in various ways on Windows that can cause Git itself to perform very badly or act in strange ways. Since OMF relies heavily on Git for most of its infrastructure, this can cause bugs, slowness, or even the inability to install OMF if Git is not set up correctly on Windows.
In general, we've improved the installer over the years to catch these kinds of problems with the shell environment and to point them out for you automatically so that you know what to look for. In general, here are a few guidelines:
- Use the Git command appropriate for the environment where Fish is installed. It is possible to accidentally use a version of Git compiled for a totally different kind of environment inside of another, where it will either perform badly or buggy.
- When using Cygwin, use the
git
command installed using Cygwin. - When using Windows Subsystem for Linux (WSL), install and use the Git provided in the package repos for your Git install.
- When using Cygwin, use the
- Make sure commands like
sort
are POSIX-compatible, and not the DOS versions of the command with the same name. - Never use
autocrlf
!
Why is there an [I]
in my prompt?
That [I]
is a built-in Fish indication that you're in vi "insert mode" and is not part of an Oh My Fish theme. You can read more about Fish vi mode here: https://fishshell.com/docs/current/index.html#vi-mode
If this isn't intentional, you can call fish_default_key_bindings
to go back to normal. If you are intentionally using insert mode, and just want to remove the indicator, you can do that by overriding fish_mode_prompt
. For example, this will disable all mode prompts entirely:
function fish_mode_prompt; end
or something like this will let you show the mode prompt only when it's not insert mode:
function fish_mode_prompt
switch $fish_bind_mode
case insert
# do nothing
case '*'
fish_default_mode_prompt
end
end
Oh My Fish fails to install on OpenWRT
When installing Oh My Fish on OpenWRT, make sure to install some dependencies first:
curl
(optional, only for online installation, with SSL support)fold
git
(with SSL support)
To install them, run:
opkg install coreutils-fold curl git git-http
curl
might probably need libwolfsslX.Y.Z.xyz
to be installed. For example:
opkg install libwolfssl4.7.0.ba20a816
Check https://openwrt.org/packages/start for more information.