oh-my-fish/pkg/omf/functions/util/omf.check.fish_prompt.fish
Derek Stavis 49dda5c2f7 Reorganize omf plugin structure
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.
2016-01-09 18:59:54 -02:00

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