commit f11f0781486f631dc35d3159a3ab4da333108686 parent df7d55681e3b7bd35ba6b25bae9a77571d5059ab Author: Jacob R. Edwards <jacobouno@protonmail.com> Date: Sat, 31 Oct 2020 12:28:29 -0700 Add functions Add fman function to act like man(1) on the given files. Add gitrinit function to initialize a remote repository and configure the local repository to push to it. Diffstat:
| M | aliases/.config/aliases/main | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/aliases/.config/aliases/main b/aliases/.config/aliases/main @@ -66,3 +66,15 @@ vol() { sndioctl output.level=$@ ;} doin() { (builtin cd ${1:?No directory} && shift && eval $@) ;} note() { doin $HOME/own/text/note/ $@ ;} fed() { doin "$FEED_DIR" feed $@ ;} +fman() { groff -man -Tascii $@ | l ;} + +# git remote init +gitrinit() { + local rpath="${1:?Remote path not given}" + local remote="${2:-git}" + + ssh "$remote" "git init --bare --shared=true '$rpath'" + git remote add origin "$remote:$rpath" + git config branch.master.remote origin + git config branch.master.merge=refs/heads/master +}