浏览代码

HN comment view helper

Simon Watson 2 年之前
父节点
当前提交
c04d103831
共有 1 个文件被更改,包括 15 次插入0 次删除
  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