Przeglądaj źródła

HN comment view helper

Simon Watson 2 lat temu
rodzic
commit
c04d103831
1 zmienionych plików z 15 dodań i 0 usunięć
  1. 15 0
      bashrc/bashrc-all

+ 15 - 0
bashrc/bashrc-all

@@ -42,6 +42,21 @@ then
 fi
 export PATH
 
+# HN Helper functions
+
+# Pull up comments for number
+export HN_PATH=$(which hn)
+hnc() {
+	if [ ! -z "$HN_PATH" ]; then
+		hn view -c $1 | $BAT_PATH
+	else
+		echo "hn not in path"
+	fi
+}
+
+# open submission in browser
+
+
 # Case defines platform specific configs
 # Platform agnostic configs above
 case $(hostname) in