new Plugin and Theme functions

pull/2/head
Bruno Pinto 9 years ago
parent 6a3c7a3f1f
commit e2d9ad8ff4

@ -0,0 +1,9 @@
function Plugin --argument-names name
if [ -e $fish_path/plugins/$name -o -e $fish_custom/plugins/$name ]
import plugins/$name
else
set_color red
echo "Plugin '$name' is not installed. Run 'fish install' to download and install it."
set_color normal
end
end

@ -0,0 +1,9 @@
function Theme --argument-names name
if [ -e $fish_path/themes/$name -o -e $fish_custom/themes/$name ]
import themes/$name
else
set_color red
echo "Theme '$name' is not installed. Run 'fish install' to download and install it."
set_color normal
end
end

@ -9,6 +9,18 @@ if not contains $fish_path/functions/ $fish_function_path
set fish_function_path $fish_path/functions/ $fish_function_path
end
if set -q fish_plugins
set_color red
echo '$fish_plugins usage has been deprecated. Please see https://asciinema.org/a/20802.'
set_color normal
end
if set -q fish_theme
set_color red
echo '$fish_theme usage has been deprecated. Please see https://asciinema.org/a/20802.'
set_color normal
end
# Add imported plugins, completions and themes. Customize imported
# commands via the $fish_path/custom directory, for example create
# a directory under $fish_path/custom/themes with the same name as

@ -1,16 +1,13 @@
# Path to your oh-my-fish.
set fish_path $HOME/.oh-my-fish
# Theme
set fish_theme robbyrussell
# All built-in plugins can be found at ~/.oh-my-fish/plugins/
# Custom plugins may be added to ~/.oh-my-fish/custom/plugins/
# Enable plugins by adding their name separated by a space to the line below.
set fish_plugins theme
# Path to your custom folder (default path is ~/.oh-my-fish/custom)
#set fish_custom $HOME/dotfiles/oh-my-fish
# Load oh-my-fish configuration.
. $fish_path/oh-my-fish.fish
# Custom plugins and themes may be added to ~/.oh-my-fish/custom
# Plugins and themes can be found at https://github.com/oh-my-fish/
Theme 'robbyrussell'
Plugin 'theme'

Loading…
Cancel
Save