diff --git a/cli/fish.sh b/cli/fish.sh index 0c62277..a4822e2 100755 --- a/cli/fish.sh +++ b/cli/fish.sh @@ -61,6 +61,8 @@ lnsf "$DIR/fish/functions/r.fish" "$XDG_CONFIG_HOME/fish/functions/r.fish" lnsf "$DIR/fish/functions/f.fish" "$XDG_CONFIG_HOME/fish/functions/f.fish" lnsf "$DIR/fish/functions/append_paths.fish" "$XDG_CONFIG_HOME/fish/functions/append_paths.fish" lnsf "$DIR/fish/functions/source_files.fish" "$XDG_CONFIG_HOME/fish/functions/source_files.fish" +lnsf "$DIR/fish/functions/git_clone_all.fish" "$XDG_CONFIG_HOME/fish/functions/git_clone_all.fish" +lnsf "$DIR/fish/functions/winip.fish" "$XDG_CONFIG_HOME/fish/functions/winip.fish" # install plugins # for better keybinding: C-o open file with $EDITOR / C-r search history / C-g open with xdg-open diff --git a/cli/fish/functions/git_clone_all.fish b/cli/fish/functions/git_clone_all.fish new file mode 100644 index 0000000..c3c38ea --- /dev/null +++ b/cli/fish/functions/git_clone_all.fish @@ -0,0 +1,6 @@ +function git_clone_all + for remote_branch in (git branch -r | awk 'NR>1{print $1}') + set local_branch (basename $remote_branch) + git branch --track $local_branch $remote_branch + end +end diff --git a/cli/fish/functions/winip.fish b/cli/fish/functions/winip.fish new file mode 100644 index 0000000..1ab6dc7 --- /dev/null +++ b/cli/fish/functions/winip.fish @@ -0,0 +1,3 @@ +function winip + grep nameserver /etc/resolv.conf | awk '{print $2}' +end