mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-15 12:12:45 +00:00
49dda5c2f7
This updates omf plugin to new architecture, moving functions to `functions` directory. It also revamps the separation of concerns between CLI and underlying implementations, organizing them into directories, whose are autoloaded in plugin startup.
11 lines
384 B
Fish
11 lines
384 B
Fish
function omf.check.fish_prompt
|
|
set -l prompt_file "fish_prompt.fish"
|
|
set -l theme (cat $OMF_CONFIG/theme)
|
|
|
|
set -l user_functions_path (omf.xdg.config_home)/fish/functions
|
|
set -l fish_prompt (readlink "$user_functions_path/$prompt_file" ^/dev/null)
|
|
|
|
not test -e "$fish_prompt"; and return 0
|
|
contains -- "$fish_prompt" {$OMF_CONFIG,$OMF_PATH}/themes/$theme/$prompt_file
|
|
end
|