From f67fa90399a3dc7a4aa8079d8e2059e68728eaeb Mon Sep 17 00:00:00 2001 From: pika Date: Wed, 22 May 2024 20:18:24 +0200 Subject: [PATCH] addet tmux-function --- config.fish | 2 +- functions/git.fish | 3 +++ functions/tmux.fish | 9 +++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 functions/tmux.fish diff --git a/config.fish b/config.fish index 09a60ef..4dd17f3 100644 --- a/config.fish +++ b/config.fish @@ -163,7 +163,7 @@ if command -v git >/dev/null 2>&1 alias gc='git clone --recurse-submodule' alias ga='git add' alias gp='git pull --recurse-submodule' - alias gsu='git submodule foreach git pull && git add . && git commit -m "๏€™ updated ๐Ÿ“Œsubmodules" && echo "-- Committed changes, pushing now.." && sleep 1.5 && git push' + alias gsu='git submodule foreach git pull && git add . && git commit -m "๏€™ updated ๐Ÿ“Œsubmodules" && echo "-- Committed changes, pushing now.." && sleep 1 && git push' alias gcm='git commit -m' alias gpu='git push --recurse-submodule=on-demand' end diff --git a/functions/git.fish b/functions/git.fish index ab44e35..449d34a 100644 --- a/functions/git.fish +++ b/functions/git.fish @@ -1,3 +1,6 @@ +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ Define function gsa (to ask the user which submodule to clone to which path and which name โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ function gsa # โ”€< Prompt the user to enter the repository URL to add as a submodule >โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ echo "-- enter the repository to add as a submodule --" diff --git a/functions/tmux.fish b/functions/tmux.fish new file mode 100644 index 0000000..a061a93 --- /dev/null +++ b/functions/tmux.fish @@ -0,0 +1,9 @@ +if command -v tmux 2>&1 + function ta + if command tmux list-sessions 2>&1 + tmux a + else + tmux + end + end +end