fish: consistency is key and other style changes
I like my empty sets with spaces between them.
This commit is contained in:
parent
89239d554d
commit
5ca224f75b
|
@ -54,7 +54,7 @@ in
|
||||||
|
|
||||||
shellAliases = mkOption {
|
shellAliases = mkOption {
|
||||||
type = with types; attrsOf str;
|
type = with types; attrsOf str;
|
||||||
default = {};
|
default = { };
|
||||||
example = { ".." = "cd .."; ll = "ls -l"; };
|
example = { ".." = "cd .."; ll = "ls -l"; };
|
||||||
description = ''
|
description = ''
|
||||||
An attribute set that maps aliases (the top level attribute names
|
An attribute set that maps aliases (the top level attribute names
|
||||||
|
@ -64,8 +64,11 @@ in
|
||||||
|
|
||||||
shellAbbrs = mkOption {
|
shellAbbrs = mkOption {
|
||||||
type = with types; attrsOf str;
|
type = with types; attrsOf str;
|
||||||
default = {};
|
default = { };
|
||||||
example = { l = "less"; gco = "git checkout"; };
|
example = {
|
||||||
|
l = "less";
|
||||||
|
gco = "git checkout";
|
||||||
|
};
|
||||||
description = ''
|
description = ''
|
||||||
An attribute set that maps aliases (the top level attribute names
|
An attribute set that maps aliases (the top level attribute names
|
||||||
in this option) to abbreviations. Abbreviations are expanded with
|
in this option) to abbreviations. Abbreviations are expanded with
|
||||||
|
@ -111,7 +114,7 @@ in
|
||||||
|
|
||||||
programs.fish.plugins = mkOption {
|
programs.fish.plugins = mkOption {
|
||||||
type = types.listOf pluginModule;
|
type = types.listOf pluginModule;
|
||||||
default = [];
|
default = [ ];
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@ -145,7 +148,7 @@ in
|
||||||
|
|
||||||
programs.fish.functions = mkOption {
|
programs.fish.functions = mkOption {
|
||||||
type = types.attrsOf types.lines;
|
type = types.attrsOf types.lines;
|
||||||
default = {};
|
default = { };
|
||||||
example = { gitignore = "curl -sL https://www.gitignore.io/api/$argv"; };
|
example = { gitignore = "curl -sL https://www.gitignore.io/api/$argv"; };
|
||||||
description = ''
|
description = ''
|
||||||
Basic functions to add to fish. For more information see
|
Basic functions to add to fish. For more information see
|
||||||
|
@ -299,25 +302,25 @@ in
|
||||||
set -l plugin_dir ${plugin.src}
|
set -l plugin_dir ${plugin.src}
|
||||||
|
|
||||||
# Set paths to import plugin components
|
# Set paths to import plugin components
|
||||||
if test -d $plugin_dir"/functions"
|
if test -d $plugin_dir/functions
|
||||||
set fish_function_path $fish_function_path[1] $plugin_dir"/functions" $fish_function_path[2..-1]
|
set fish_function_path $fish_function_path[1] $plugin_dir/functions $fish_function_path[2..-1]
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -d $plugin_dir"/completions"
|
if test -d $plugin_dir/completions
|
||||||
set fish_complete_path $fish_function_path[1] $plugin_dir"/completions" $fish_complete_path[2..-1]
|
set fish_complete_path $fish_function_path[1] $plugin_dir/completions $fish_complete_path[2..-1]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Source initialization code if it exists.
|
# Source initialization code if it exists.
|
||||||
if test -d $plugin_dir"/conf.d"
|
if test -d $plugin_dir/conf.d
|
||||||
source $plugin_dir/conf.d/*.fish
|
source $plugin_dir/conf.d/*.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -f $plugin_dir"/key_bindings.fish"
|
if test -f $plugin_dir/key_bindings.fish
|
||||||
source $plugin_dir"/key_bindings.fish"
|
source $plugin_dir/key_bindings.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -f $plugin_dir"/init.fish"
|
if test -f $plugin_dir/init.fish
|
||||||
source $plugin_dir"/init.fish"
|
source $plugin_dir/init.fish
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
}) cfg.plugins));
|
}) cfg.plugins));
|
||||||
|
|
|
@ -11,25 +11,25 @@ let
|
||||||
set -l plugin_dir ${fooPluginSrc}
|
set -l plugin_dir ${fooPluginSrc}
|
||||||
|
|
||||||
# Set paths to import plugin components
|
# Set paths to import plugin components
|
||||||
if test -d $plugin_dir"/functions"
|
if test -d $plugin_dir/functions
|
||||||
set fish_function_path $fish_function_path[1] $plugin_dir"/functions" $fish_function_path[2..-1]
|
set fish_function_path $fish_function_path[1] $plugin_dir/functions $fish_function_path[2..-1]
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -d $plugin_dir"/completions"
|
if test -d $plugin_dir/completions
|
||||||
set fish_complete_path $fish_function_path[1] $plugin_dir"/completions" $fish_complete_path[2..-1]
|
set fish_complete_path $fish_function_path[1] $plugin_dir/completions $fish_complete_path[2..-1]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Source initialization code if it exists.
|
# Source initialization code if it exists.
|
||||||
if test -d $plugin_dir"/conf.d"
|
if test -d $plugin_dir/conf.d
|
||||||
source $plugin_dir/conf.d/*.fish
|
source $plugin_dir/conf.d/*.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -f $plugin_dir"/key_bindings.fish"
|
if test -f $plugin_dir/key_bindings.fish
|
||||||
source $plugin_dir"/key_bindings.fish"
|
source $plugin_dir/key_bindings.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -f $plugin_dir"/init.fish"
|
if test -f $plugin_dir/init.fish
|
||||||
source $plugin_dir"/init.fish"
|
source $plugin_dir/init.fish
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue