Commit Graph

29 Commits (72b56c5abae2ae7db15d0867a620ff97c4957a8f)

Author SHA1 Message Date
Derek W. Stavis 355cc597fa
add conf.d to require mechanism (#653) 6 years ago
Stephen M. Coakley d951cb1a15 Normalize redirection syntax (#459) 8 years ago
Derek Willian Stavis 7c3db938c2 docs: improve headers, use flag emojis for translations (#370) 8 years ago
Derek Willian Stavis 1d0e9aa4c7 lib/README: cleanup, better document require (#369) 8 years ago
Derek Willian Stavis 8aa8acb027 lib/git: fix branch name in detached head (#366) 8 years ago
Derek Willian Stavis 4691b92dab require: fix completions autoload (#343) 8 years ago
Derek Willian Stavis 2c4471a78c autoload: refactor for conformance and performance (#262)
Refactor autoload: Split the big function into two smaller ones,
doing only option parsing at main function.

The algorithm is also rewritten, now in two steps for both path
inclusion an exclusion functions: 1) use auxiliary lists to store
valid function and completion paths, 2) bulk insert or remove just
once in the variable.

Now also respects path insertion policy, keeping user function
path always in front of other paths, thus allowing precedence of
user functions.
8 years ago
Derek Willian Stavis a164ebdd5d init: rewrite init process (#260)
* init: rewrite init process

Now use pure globbing to generate 100% valid function and
completion paths, effectively splitting the init process in two
steps, one which paths are added, and other when initialization
is done (sourcing init).

This initialization code introduces a new interface for
`init.fish` hook, which deprecates the previously used event
model. The new interface injects three variables into `init.fish`:
path, package and bundle. This variables can be used by the
package to autoload paths, use bundled files, etc.

Also supports key bindings by sourcing
$OMF_CONFIG/key_bindings.fish and also key_bindings.fish in
packages (plugins and themes) root directories. This is done
when fish_user_key_bindings is called.

* omf: migrate to new init hook

* omf/templates: migrate to new init and uninstall hooks

* docs: document new init and uninstall hooks interface

* README: update new hook interface spec
8 years ago
Justin Hileman b490fad367 Merge branch 'master' into deprecate-refresh 8 years ago
Derek Stavis 65dfadfc02 lib: deprecate `available` function
This PR officially marks available as deprecated, moving the
deprecated functionality to omf plugin compat quarantine directory.
8 years ago
Derek Stavis 37705618b2 lib: deprecate `refresh` function
With great power comes great responsibility. This function is
somewhat low level, and is harmful to shell's user, as it
completely screws up with job control (subprocesses).

This PR officially marks `refresh` as deprecated, moving the
deprecated functionality to omf plugin `compat` quarantine
directory.
8 years ago
Derek Stavis de0aaeabf7 git_ahead: Fix indicator override 9 years ago
Itzik Ephraim e83b674fd3 bugfix: git_ahead no longer reports 'none' as 'ahead' 9 years ago
Itzik Ephraim ec8c209f07 A different approach in git_ahead 9 years ago
Itzik Ephraim 6fa3332438 bugfix: add missing $s in git_ahead 9 years ago
Derek Stavis 042657cdcf require: recursively require package dependencies 9 years ago
Bruno Pinto 5f77a5db12 Remove `basename` from core library
The features added by this function are not used anywhere.

Fix #151
9 years ago
Derek Stavis bf44c45cd5 autoload: Use set -e to remove path from destination 9 years ago
Derek Stavis ecbc9c5ed3 require: Cleanup previously sourced init functions 9 years ago
Derek Stavis ebd7192cd1 Implement `autoload -e` to remove autoload path
Address the use case of autoload path removal, which allows themes
and packages definitions to be unloaded from running fish session.
9 years ago
Bruno Pinto 1ab8a20b8c Fix #8: Fishy plugin template 9 years ago
Derek Stavis 8b8a7c8d73 Save history before replacing shell process
Fixes an issue with history between shell reloads via refresh function call.
As `exec` replaces the current process in a non-gently fashion, the
persistent history could be out of sync with the in-memory history.

Calling `history --save` before `exec` should force the shell to persist the
history before replacing the current process.
9 years ago
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.
9 years ago
Bruno Pinto 30ab05445d Add `require` function to support plugin dep
In order to support dependency between plugins a function called
`require` has been added.
9 years ago
Derek Willian Stavis 2fbd1535f7 lib/README: fix swapped lines
Swap `prompt_segments` and `refresh` description.
9 years ago
Bruno Pinto 8aa6bf7ee2 Remove unnecessary code
This was actually trying to load PATHs that do not exist under $OMF_CONFIG
directory and sourcing files that did not exist.
9 years ago
Bruno Pinto ae0e4388b6 Back to oh-my-fish organization 9 years ago
Jorge Bucaran bf52f5d57a fix basename polyfill 9 years ago
Jorge Bucaran 2693a2fd18 %%% United States of the Fish → Wahoo + OMF %%% 9 years ago