oh-my-fish/lib
Johannes Altmanninger b1b10c333d
Check whether we are inside the worktree (#651)
Some git commands require to be run from inside the worktree (as opposed
    to the git dir, although it's usually in .git). This commit adds
a function git_is_worktree to check this. It is used for the commands
that need the worktree instead of git_is_repo.

An alternative solution might have been to find the git worktree in the
parent of the git directory, but this doesn't work for all cases.
Generally it's impossible to detect the location of the worktree (plus
    it's not unique).

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
2020-11-30 15:09:43 -08:00
..
completions %%% United States of the Fish → Wahoo + OMF %%% 2015-08-27 00:20:13 +09:00
git Check whether we are inside the worktree (#651) 2020-11-30 15:09:43 -08:00
autoload.fish Add missing quotation marks in autoload (#711) 2019-07-22 22:21:53 -07:00
prompt_segments.fish %%% United States of the Fish → Wahoo + OMF %%% 2015-08-27 00:20:13 +09:00
README.md docs: improve headers, use flag emojis for translations (#370) 2016-07-24 01:25:01 -03:00
require.fish Put conf_file loop outside of init_file loop (#666) 2019-01-10 19:57:14 -02:00

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