]> git.armaanb.net Git - config.org.git/commitdiff
zsh: modify aliases/functions
authorArmaan Bhojwani <me@armaanb.net>
Mon, 19 Apr 2021 16:55:00 +0000 (12:55 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Mon, 19 Apr 2021 16:55:00 +0000 (12:55 -0400)
config.org

index 01304fcdac2c155f595919676f3a54384a85b3e0..b63a59e87affb7c7774175b6d5dbc59117687386 100644 (file)
@@ -1025,11 +1025,20 @@ If no command given, =ls=, if in a Git repo, =git status= as well.
       mv $1.tmp $2
   }
 #+end_src
+**** Finger
+#+begin_src shell :tangle ~/.config/zsh/zshrc
+  finger() {
+      user=$(echo "$1" | cut -f 1 -d '@')
+      host=$(echo "$1" | cut -f 2 -d '@')
+      echo $user | nc "$host" 79 -N
+  }
+#+end_src
 *** Aliases
 **** SSH
 #+begin_src shell :tangle ~/.config/zsh/zshrc
   alias bhoji-drop='ssh -p 23 root@armaanb.net'
-  alias catgirl='ssh -p 23 -t root@armaanb.net abduco -a catgirl'
+  alias catgirl='ssh root@armaanb.net -t abduco -A irc catgirl freenode'
+  alias union='ssh 192.168.1.18'
   alias tcf='ssh root@204.48.23.68'
   alias ngmun='ssh root@157.245.89.25'
   alias prox='ssh root@192.168.1.224'
@@ -1086,11 +1095,11 @@ If no command given, =ls=, if in a Git repo, =git status= as well.
   alias cip='curl https://armaanb.net/ip'
   alias gps='gpg --keyserver keyserver.ubuntu.com --search-keys'
   alias gpp='gpg --keyserver keyserver.ubuntu.com --recv-key'
-#+end_src
-**** Docker
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  alias dc='docker-compose'
-  alias dcdu='docker-compose down && docker-compose up -d'
+  alias plan='T=$(mktemp) && \
+        rsync root@armaanb.net:/etc/finger/plan.txt "$T" && \
+        vim $T && \
+        rsync "$T" root@armaanb.net:/etc/finger/plan.txt'
+  alias wttr='curl -s "wttr.in/02445?n" | head -n -3'
 #+end_src
 **** Other
 #+begin_src shell :tangle ~/.config/zsh/zshrc