You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
oh-my-fish/lib
Fabian Homborg 131c8d74e5 lib/git/git_is_touched: Speed up (#706)
* lib/git/git_is_touched: Speed up

This used to use `git status --porcelain`, which by necessity needs to
check the entire repo for all kinds of changes, just to figure out if
there are any.

Instead, we now use git commands that can exit early.

In large repos, this can be faster by a factor of 15 or so.

Fixes #624.

* Fix return status

`git diff` also returns 1 if there *is* a diff.
5 years ago
..
completions %%% United States of the Fish → Wahoo + OMF %%% 9 years ago
git lib/git/git_is_touched: Speed up (#706) 5 years ago
README.md docs: improve headers, use flag emojis for translations (#370) 8 years ago
autoload.fish Normalize redirection syntax (#459) 8 years ago
prompt_segments.fish %%% United States of the Fish → Wahoo + OMF %%% 9 years ago
require.fish Put conf_file loop outside of init_file loop (#666) 5 years ago

README.md

Core Library

Oh My Fish Documentation


require [--no-bundle] <name>...

require [--no-bundle] --path <path>...

Does initialization of Oh My Fish compatible packages:

  • Autoload function and completion paths
  • Source key bindings
  • Require dependencies from bundle
  • Source init.fish file

require support packages in the following directory structure:

functions/
completions/
bundle
init.fish
key_bindings.fish

When using the form require <name>..., the search path for packages is $OMF_CONFIG and $OMF_PATH. It's also possible to require directories using --path switch. To ignore dependency loading you can also use --no-bundle switch

This function is the base of Oh My Fish framework, being responsible for the major part of framework's own startup code.

autoload [-e] <path>...

Manipulate autoloading path components.

All paths ending with completions are correctly added to or erased from $fish_complete_path.

To add paths to autoload:

autoload $mypath $mypath/completions

To erase paths from autoload:

autoload -e $mypath $mypath/completions