Browse Source

HN comment view helper

Simon Watson 3 years ago
parent
commit
c04d103831
1 changed files with 15 additions and 0 deletions
  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