refactor: move git ignore alias to own script
This commit is contained in:
parent
ec1a6acebc
commit
92e2e149bc
2 changed files with 31 additions and 20 deletions
|
|
@ -50,24 +50,6 @@ in
|
|||
${exportedVariables}
|
||||
'';
|
||||
functions = {
|
||||
gi = ''
|
||||
set url https://www.gitignore.io/api
|
||||
|
||||
if test (count $argv) -eq 0
|
||||
set choice ( curl -sL $url/list \
|
||||
| string split "," \
|
||||
| ${getExe pkgs.fzf} -m \
|
||||
| string join "," )
|
||||
else
|
||||
set choice (string join "," $argv[1..])
|
||||
end
|
||||
|
||||
if ${getExe pkgs.gum} confirm "Overwrite current .gitignore?"
|
||||
${getExe pkgs.curl} -sL $url/$choice > .gitignore
|
||||
else
|
||||
${getExe pkgs.curl} -sL $url/$choice >> .gitignore
|
||||
end
|
||||
'';
|
||||
fish_greeting = "";
|
||||
cheat = "cht.sh $argv | bat -p";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue