mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 23:55:37 +00:00
move static fish functions
This commit is contained in:
parent
5f946b5d8c
commit
fa25e24351
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
function __complete_nomad
|
|
||||||
set -lx COMP_LINE (commandline -cp)
|
|
||||||
test -z (commandline -ct)
|
|
||||||
and set COMP_LINE "$COMP_LINE "
|
|
||||||
/usr/local/bin/nomad
|
|
||||||
end
|
|
||||||
complete -f -c nomad -a "(__complete_nomad)"
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./fish.nix
|
./fish
|
||||||
./starship.nix
|
./starship.nix
|
||||||
./fzf.nix
|
./fzf.nix
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
|
@ -11,8 +11,7 @@
|
|||||||
functions = {
|
functions = {
|
||||||
commandline-git-commits = {
|
commandline-git-commits = {
|
||||||
description = "Insert commit into commandline";
|
description = "Insert commit into commandline";
|
||||||
body = builtins.readFile
|
body = builtins.readFile ./functions/commandline-git-commits.fish;
|
||||||
../../fish.configlink/functions/commandline-git-commits.fish;
|
|
||||||
};
|
};
|
||||||
copy = {
|
copy = {
|
||||||
description = "Copy file contents into clipboard";
|
description = "Copy file contents into clipboard";
|
||||||
@ -20,7 +19,7 @@
|
|||||||
};
|
};
|
||||||
edit = {
|
edit = {
|
||||||
description = "Open a file in Vim";
|
description = "Open a file in Vim";
|
||||||
body = builtins.readFile ../../fish.configlink/functions/edit.fish;
|
body = builtins.readFile ./functions/edit.fish;
|
||||||
};
|
};
|
||||||
envs = {
|
envs = {
|
||||||
description = "Evaluate a bash-like environment variables file";
|
description = "Evaluate a bash-like environment variables file";
|
||||||
@ -29,15 +28,12 @@
|
|||||||
fcd = {
|
fcd = {
|
||||||
description = "Jump to directory";
|
description = "Jump to directory";
|
||||||
argumentNames = "directory";
|
argumentNames = "directory";
|
||||||
body = builtins.readFile ../../fish.configlink/functions/fcd.fish;
|
body = builtins.readFile ./functions/fcd.fish;
|
||||||
};
|
};
|
||||||
fish_user_key_bindings = {
|
fish_user_key_bindings = {
|
||||||
body = builtins.readFile
|
body = builtins.readFile ./functions/fish_user_key_bindings.fish;
|
||||||
../../fish.configlink/functions/fish_user_key_bindings.fish;
|
|
||||||
};
|
|
||||||
ip = {
|
|
||||||
body = builtins.readFile ../../fish.configlink/functions/ip.fish;
|
|
||||||
};
|
};
|
||||||
|
ip = { body = builtins.readFile ./functions/ip.fish; };
|
||||||
json = {
|
json = {
|
||||||
description = "Tidy up JSON using jq";
|
description = "Tidy up JSON using jq";
|
||||||
body = "pbpaste | jq '.' | pbcopy"; # Need to fix for non-macOS
|
body = "pbpaste | jq '.' | pbcopy"; # Need to fix for non-macOS
|
||||||
@ -46,16 +42,15 @@
|
|||||||
note = {
|
note = {
|
||||||
description = "Edit or create a note";
|
description = "Edit or create a note";
|
||||||
argumentNames = "filename";
|
argumentNames = "filename";
|
||||||
body = builtins.readFile ../../fish.configlink/functions/note.fish;
|
body = builtins.readFile ./functions/note.fish;
|
||||||
};
|
};
|
||||||
recent = {
|
recent = {
|
||||||
description = "Open a recent file in Vim";
|
description = "Open a recent file in Vim";
|
||||||
body = builtins.readFile ../../fish.configlink/functions/recent.fish;
|
body = builtins.readFile ./functions/recent.fish;
|
||||||
};
|
};
|
||||||
syncnotes = {
|
syncnotes = {
|
||||||
description = "Full git commit on notes";
|
description = "Full git commit on notes";
|
||||||
body =
|
body = builtins.readFile ./functions/syncnotes.fish;
|
||||||
builtins.readFile ../../fish.configlink/functions/syncnotes.fish;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
@ -66,17 +66,13 @@ in {
|
|||||||
|
|
||||||
programs.fish.functions = lib.mkIf (builtins.elem pkgs.fzf home-packages
|
programs.fish.functions = lib.mkIf (builtins.elem pkgs.fzf home-packages
|
||||||
&& builtins.elem pkgs.bat home-packages) {
|
&& builtins.elem pkgs.bat home-packages) {
|
||||||
git = {
|
git = { body = builtins.readFile ./fish/functions/git.fish; };
|
||||||
body = builtins.readFile ../../fish.configlink/functions/git.fish;
|
|
||||||
};
|
|
||||||
git-add-fuzzy = {
|
git-add-fuzzy = {
|
||||||
body = builtins.readFile
|
body = builtins.readFile ./fish/functions/git-add-fuzzy.fish;
|
||||||
../../fish.configlink/functions/git-add-fuzzy.fish;
|
|
||||||
};
|
};
|
||||||
git-fuzzy-branch = {
|
git-fuzzy-branch = {
|
||||||
argumentNames = "header";
|
argumentNames = "header";
|
||||||
body = builtins.readFile
|
body = builtins.readFile ./fish/functions/git-fuzzy-branch.fish;
|
||||||
../../fish.configlink/functions/git-fuzzy-branch.fish;
|
|
||||||
};
|
};
|
||||||
git-checkout-fuzzy = {
|
git-checkout-fuzzy = {
|
||||||
body = ''
|
body = ''
|
||||||
@ -103,26 +99,21 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
git-show-fuzzy = {
|
git-show-fuzzy = {
|
||||||
body = builtins.readFile
|
body = builtins.readFile ./fish/functions/git-show-fuzzy.fish;
|
||||||
../../fish.configlink/functions/git-show-fuzzy.fish;
|
|
||||||
};
|
};
|
||||||
git-commits = {
|
git-commits = {
|
||||||
body = builtins.readFile
|
body = builtins.readFile ./fish/functions/git-commits.fish;
|
||||||
../../fish.configlink/functions/git-commits.fish;
|
|
||||||
};
|
};
|
||||||
git-history = {
|
git-history = {
|
||||||
body = builtins.readFile
|
body = builtins.readFile ./fish/functions/git-history.fish;
|
||||||
../../fish.configlink/functions/git-history.fish;
|
|
||||||
};
|
};
|
||||||
git-push-upstream = {
|
git-push-upstream = {
|
||||||
description = "Create upstream branch";
|
description = "Create upstream branch";
|
||||||
body = builtins.readFile
|
body = builtins.readFile ./fish/functions/git-push-upstream.fish;
|
||||||
../../fish.configlink/functions/git-push-upstream.fish;
|
|
||||||
};
|
};
|
||||||
uncommitted = {
|
uncommitted = {
|
||||||
description = "Find uncommitted git repos";
|
description = "Find uncommitted git repos";
|
||||||
body = builtins.readFile
|
body = builtins.readFile ./fish/functions/uncommitted.fish;
|
||||||
../../fish.configlink/functions/uncommitted.fish;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user