5f30a4963a1c

Merge.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 09 May 2019 16:45:54 -0400
parents 27ccadef78b3 (diff) a92fa44e6833 (current diff)
children 0b7bb860082f 1b2269fb3ada
branches/tags (none)
files

Changes

--- a/bash_profile	Wed May 08 18:16:07 2019 -0400
+++ b/bash_profile	Thu May 09 16:45:54 2019 -0400
@@ -2,7 +2,6 @@
 
 shopt -s expand_aliases
 
-
 # This file contains aliases and functions that duplicate some fish
 # functionality, because Vim will use bash as its external command shell.
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/bash-dammit	Thu May 09 16:45:54 2019 -0400
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+exec /bin/bash --login "$@"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/echon	Thu May 09 16:45:54 2019 -0400
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+echo -n "$@"
--- a/lisp/clhs.lisp	Wed May 08 18:16:07 2019 -0400
+++ b/lisp/clhs.lisp	Thu May 09 16:45:54 2019 -0400
@@ -17,6 +17,7 @@
 (defparameter *default-open-command* "open")
 (defparameter *open* *default-open-command*)
 (defparameter *url* *default-hyperspec-url*)
+(defparameter *quiet* nil)
 
 
 ;;;; Curl ---------------------------------------------------------------------
@@ -92,7 +93,8 @@
   (let ((path (find-symbol-path target-symbol)))
     (if path
       (let ((url (url path)))
-        (format t "Opening ~A~%" url)
+        (unless *quiet*
+          (format t "Opening ~A~%" url))
         (uiop:run-program `(,*open* ,url)
                           :ignore-error-status t
                           :input :interactive
@@ -127,6 +129,14 @@
     :short #\h
     :reduce (constantly t)))
 
+(defparameter *o-quiet*
+  (adopt:make-option 'quiet
+    :help "don't display extra logging output"
+    :manual "Don't display any extra logging output."
+    :long "quiet"
+    :short #\q
+    :reduce (constantly t)))
+
 (defparameter *o-rebuild-cache*
   (adopt:make-option 'rebuild-cache
     :help "rebuild the symbol cache"
@@ -142,7 +152,7 @@
     :short #\o
     :parameter "COMMAND"
     :initial-value *default-open-command*
-    :reduce #'adopt:newest))
+    :reduce #'adopt:last))
 
 (defparameter *o-url*
   (adopt:make-option 'url
@@ -156,7 +166,7 @@
     :short #\u
     :parameter "URL"
     :initial-value *default-hyperspec-url*
-    :reduce #'adopt:newest))
+    :reduce #'adopt:last))
 
 
 (defparameter *ui*
@@ -167,6 +177,7 @@
     :help *documentation*
     :examples *examples*
     :contents (list *o-help*
+                    *o-quiet*
                     *o-rebuild-cache*
                     *o-open*
                     *o-url*)))
@@ -178,6 +189,7 @@
           (adopt:print-help-and-exit *ui*))
         (let ((*open* (gethash 'open options))
               (*url* (gethash 'url options))
+              (*quiet* (gethash 'quiet options))
               (target (first arguments)))
           (if (gethash 'rebuild-cache options)
             (rebuild-cache)
--- a/stumpwmrc	Wed May 08 18:16:07 2019 -0400
+++ b/stumpwmrc	Thu May 09 16:45:54 2019 -0400
@@ -17,7 +17,7 @@
       *new-frame-action* :empty
       *window-format* "(%n%m%20t)"
       *window-name-source* :title
-      *shell-program* "/bin/bash")
+      *shell-program* "/home/sjl/src/dotfiles/bin/bash-dammit")
 
 
 ;;;; Utils --------------------------------------------------------------------
@@ -222,6 +222,10 @@
      (run-shell-command "systemctl suspend"))
     (t (message "Not sleeping this machine for safety.."))))
 
+(defcommand copy-clhs-url (s)
+    ((:string "Symbol: "))
+  (run-shell-command (format nil "clhs --url 'http://www.lispworks.com/documentation/HyperSpec/' --quiet --open echon '~A' | pbcopy" s)))
+
 
 ;;;; Terminal Fonts -----------------------------------------------------------
 (defcommand st-font-up ()