mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-24 02:34:52 +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 = [
|
||||
./fish.nix
|
||||
./fish
|
||||
./starship.nix
|
||||
./fzf.nix
|
||||
./direnv.nix
|
||||
|
@ -11,8 +11,7 @@
|
||||
functions = {
|
||||
commandline-git-commits = {
|
||||
description = "Insert commit into commandline";
|
||||
body = builtins.readFile
|
||||
../../fish.configlink/functions/commandline-git-commits.fish;
|
||||
body = builtins.readFile ./functions/commandline-git-commits.fish;
|
||||
};
|
||||
copy = {
|
||||
description = "Copy file contents into clipboard";
|
||||
@ -20,7 +19,7 @@
|
||||
};
|
||||
edit = {
|
||||
description = "Open a file in Vim";
|
||||
body = builtins.readFile ../../fish.configlink/functions/edit.fish;
|
||||
body = builtins.readFile ./functions/edit.fish;
|
||||
};
|
||||
envs = {
|
||||
description = "Evaluate a bash-like environment variables file";
|
||||
@ -29,15 +28,12 @@
|
||||
fcd = {
|
||||
description = "Jump to directory";
|
||||
argumentNames = "directory";
|
||||
body = builtins.readFile ../../fish.configlink/functions/fcd.fish;
|
||||
body = builtins.readFile ./functions/fcd.fish;
|
||||
};
|
||||
fish_user_key_bindings = {
|
||||
body = builtins.readFile
|
||||
../../fish.configlink/functions/fish_user_key_bindings.fish;
|
||||
};
|
||||
ip = {
|
||||
body = builtins.readFile ../../fish.configlink/functions/ip.fish;
|
||||
body = builtins.readFile ./functions/fish_user_key_bindings.fish;
|
||||
};
|
||||
ip = { body = builtins.readFile ./functions/ip.fish; };
|
||||
json = {
|
||||
description = "Tidy up JSON using jq";
|
||||
body = "pbpaste | jq '.' | pbcopy"; # Need to fix for non-macOS
|
||||
@ -46,16 +42,15 @@
|
||||
note = {
|
||||
description = "Edit or create a note";
|
||||
argumentNames = "filename";
|
||||
body = builtins.readFile ../../fish.configlink/functions/note.fish;
|
||||
body = builtins.readFile ./functions/note.fish;
|
||||
};
|
||||
recent = {
|
||||
description = "Open a recent file in Vim";
|
||||
body = builtins.readFile ../../fish.configlink/functions/recent.fish;
|
||||
body = builtins.readFile ./functions/recent.fish;
|
||||
};
|
||||
syncnotes = {
|
||||
description = "Full git commit on notes";
|
||||
body =
|
||||
builtins.readFile ../../fish.configlink/functions/syncnotes.fish;
|
||||
body = builtins.readFile ./functions/syncnotes.fish;
|
||||
};
|
||||
};
|
||||
interactiveShellInit = ''
|
@ -66,17 +66,13 @@ in {
|
||||
|
||||
programs.fish.functions = lib.mkIf (builtins.elem pkgs.fzf home-packages
|
||||
&& builtins.elem pkgs.bat home-packages) {
|
||||
git = {
|
||||
body = builtins.readFile ../../fish.configlink/functions/git.fish;
|
||||
};
|
||||
git = { body = builtins.readFile ./fish/functions/git.fish; };
|
||||
git-add-fuzzy = {
|
||||
body = builtins.readFile
|
||||
../../fish.configlink/functions/git-add-fuzzy.fish;
|
||||
body = builtins.readFile ./fish/functions/git-add-fuzzy.fish;
|
||||
};
|
||||
git-fuzzy-branch = {
|
||||
argumentNames = "header";
|
||||
body = builtins.readFile
|
||||
../../fish.configlink/functions/git-fuzzy-branch.fish;
|
||||
body = builtins.readFile ./fish/functions/git-fuzzy-branch.fish;
|
||||
};
|
||||
git-checkout-fuzzy = {
|
||||
body = ''
|
||||
@ -103,26 +99,21 @@ in {
|
||||
'';
|
||||
};
|
||||
git-show-fuzzy = {
|
||||
body = builtins.readFile
|
||||
../../fish.configlink/functions/git-show-fuzzy.fish;
|
||||
body = builtins.readFile ./fish/functions/git-show-fuzzy.fish;
|
||||
};
|
||||
git-commits = {
|
||||
body = builtins.readFile
|
||||
../../fish.configlink/functions/git-commits.fish;
|
||||
body = builtins.readFile ./fish/functions/git-commits.fish;
|
||||
};
|
||||
git-history = {
|
||||
body = builtins.readFile
|
||||
../../fish.configlink/functions/git-history.fish;
|
||||
body = builtins.readFile ./fish/functions/git-history.fish;
|
||||
};
|
||||
git-push-upstream = {
|
||||
description = "Create upstream branch";
|
||||
body = builtins.readFile
|
||||
../../fish.configlink/functions/git-push-upstream.fish;
|
||||
body = builtins.readFile ./fish/functions/git-push-upstream.fish;
|
||||
};
|
||||
uncommitted = {
|
||||
description = "Find uncommitted git repos";
|
||||
body = builtins.readFile
|
||||
../../fish.configlink/functions/uncommitted.fish;
|
||||
body = builtins.readFile ./fish/functions/uncommitted.fish;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user