oh-my-fish/lib
Bruno Pinto 319c8a05cd Don't overwrite function on test environment
Instead of overwriting functions that use `exec fish` on test
environment, skip this call if the variable `CI` has been defined on the
running shell.
2015-10-02 23:50:18 +01:00
..
completions %%% United States of the Fish → Wahoo + OMF %%% 2015-08-27 00:20:13 +09:00
git %%% United States of the Fish → Wahoo + OMF %%% 2015-08-27 00:20:13 +09:00
autoload.fish Add require function to support plugin dep 2015-10-02 21:35:06 +01:00
available.fish Add require function to support plugin dep 2015-10-02 21:35:06 +01:00
basename.fish fix basename polyfill 2015-08-27 03:55:16 +09:00
prompt_segments.fish %%% United States of the Fish → Wahoo + OMF %%% 2015-08-27 00:20:13 +09:00
README.md lib/README: fix swapped lines 2015-09-14 14:06:37 -03:00
refresh.fish Don't overwrite function on test environment 2015-10-02 23:50:18 +01:00
require.fish Add require function to support plugin dep 2015-10-02 21:35:06 +01:00

Core Library

Basic Functions

autoload <path [path...]>

Autoload a function or completion path. Add the specified list of directories to $fish_function_path.

Any completions directories are correctly added to the $fish_complete_path.

autoload $mypath $mypath/completions

available <name>

Check if a program is available to run. Sets $status to 0 if the program is available.

Use this function to check if a plugin is available before using it:

if available battery
  battery
end

basename <path> ...

Wrap basename so it can handle multiple arguments.

refresh

Replace the running instance of fishshell with a new one causing Oh My Fish to reload as well.

prompt_segments

Extract the root (top-most parent directory), dirname and basename from fish_prompt.

Git Functions

git_ahead

Echo a character that represents whether the current repo is ahead, behind or has diverged from its upstream.

Default values:
  • ahead: +
  • behind: -
  • diverged: ±
  • none:

git_is_repo

Set $status to 0 if the current working directory belongs to a git repo.

git_branch_name

Echo the currently checked out branch name of the current repo.

git_is_dirty

Set $status to 0 if there are any changes to files already being tracked in the repo.

git_is_staged

Set $status to 0 if there staged changes.

git_is_stashed

Set $status to 0 if there are items in the stash.

git_is_touched

Set $status to 0 if the repo has any changes whatsoever, including tracked or untracked files.

git_untracked

Echo a \n separated list of untracked files.