Specify bash to prevent shellcheck from complaining
[khome.git] / home / lib / login_functions.sh
index e51a2fa..c393938 100644 (file)
@@ -1,4 +1,4 @@
-#
+#! /bin/bash
 
 ## open : string -> unit
 ##
@@ -96,6 +96,16 @@ p() {
         | xsel -i -b -t 30000
 }
 
+dl() {
+    local -r timestamp="$(date --iso-8601=ns)"
+    local -r dir="$HOME"/dl/adhoc/"$timestamp"
+    local -r url_file_path="${dir}/url"
+
+    mkdir -p "$dir"
+    touch "$url_file_path"
+    cd "$dir"
+}
+
 ## web search
 ## ws : string -> unit
 ws() {
@@ -826,6 +836,9 @@ status() {
 
     echo "${indent_unit}-->"
 
+    # TODO Populate pid->cmd dict from `ps -eo pid,comm` and lookup progs there
+    #      since netstat -p output comes out truncated.
+
     sudo -n netstat -tulnp \
     | awk -v indent="${indent_unit}${indent_unit}" '
         NR > 2 && ((/^tcp/ && proc = $7) || (/^udp/ && proc = $6)) {
This page took 0.026704 seconds and 4 git commands to generate.