From 7d35464246879a4569f195e3dd8321ed51090623 Mon Sep 17 00:00:00 2001 From: Renarde-dev Date: Mon, 27 Jan 2025 22:36:18 +0100 Subject: [PATCH] Add existing functions --- alias/ga.fish | 4 ++++ alias/gcmsg.fish | 4 ++++ alias/gco.fish | 4 ++++ alias/gss.fish | 4 ++++ alias/gst.fish | 4 ++++ alias/l.fish | 4 ++++ alias/ls.fish | 4 ++++ functions/Gitconf.fish | 18 ++++++++++++++++++ 8 files changed, 46 insertions(+) create mode 100644 alias/ga.fish create mode 100644 alias/gcmsg.fish create mode 100644 alias/gco.fish create mode 100644 alias/gss.fish create mode 100644 alias/gst.fish create mode 100644 alias/l.fish create mode 100644 alias/ls.fish create mode 100644 functions/Gitconf.fish diff --git a/alias/ga.fish b/alias/ga.fish new file mode 100644 index 0000000..6661b8c --- /dev/null +++ b/alias/ga.fish @@ -0,0 +1,4 @@ +function ga --wraps='git add' --description 'alias ga=git add' + git add $argv + +end diff --git a/alias/gcmsg.fish b/alias/gcmsg.fish new file mode 100644 index 0000000..6205976 --- /dev/null +++ b/alias/gcmsg.fish @@ -0,0 +1,4 @@ +function gcmsg --wraps='git commit -m' --description 'alias gcmsg=git commit -m' + git commit -m $argv + +end diff --git a/alias/gco.fish b/alias/gco.fish new file mode 100644 index 0000000..ac512e9 --- /dev/null +++ b/alias/gco.fish @@ -0,0 +1,4 @@ +function gco --wraps='git checkout' --description 'alias gco=git checkout' + git checkout $argv + +end diff --git a/alias/gss.fish b/alias/gss.fish new file mode 100644 index 0000000..7fbf065 --- /dev/null +++ b/alias/gss.fish @@ -0,0 +1,4 @@ +function gss --wraps='git status -s' --description 'alias gss=git status -s' + git status -s $argv + +end diff --git a/alias/gst.fish b/alias/gst.fish new file mode 100644 index 0000000..1822c5c --- /dev/null +++ b/alias/gst.fish @@ -0,0 +1,4 @@ +function gst --wraps='git status' --description 'alias gst=git status' + git status $argv + +end diff --git a/alias/l.fish b/alias/l.fish new file mode 100644 index 0000000..94e10f6 --- /dev/null +++ b/alias/l.fish @@ -0,0 +1,4 @@ +function l --wraps='eza --icons -al' --description 'alias l=eza --icons -al' + eza --icons -al $argv + +end diff --git a/alias/ls.fish b/alias/ls.fish new file mode 100644 index 0000000..7720a54 --- /dev/null +++ b/alias/ls.fish @@ -0,0 +1,4 @@ +function ls --wraps='eza --icons' --description 'alias ls=eza --icons' + eza --icons $argv + +end diff --git a/functions/Gitconf.fish b/functions/Gitconf.fish new file mode 100644 index 0000000..1fb5650 --- /dev/null +++ b/functions/Gitconf.fish @@ -0,0 +1,18 @@ +function Gitconf -d "Autoconf git repo" + command git status -s > /dev/null + if test $status = 0 + if test $argv = "univ-nantes" + command git config user.email "lana.heyrendt@etu.univ-nantes.fr" + command git config user.name "Lana Heyrendt" + command git config commit.gpgSign true + command git config user.signingKey "" + else if test $argv = "taniere" + command git config user.email "renarde-dev@la-taniere-solidaire.fr" + command git config user.name "Renarde-dev" + command git config commit.gpgSign true + command git config user.signingKey "" + else + echo "no matching config" + end + end +end