Skip to content

Commit

Permalink
Use -q by default for operations that might show progress bars
Browse files Browse the repository at this point in the history
Progress bars are very slow to draw in comint
  • Loading branch information
amake committed Aug 14, 2024
1 parent dc1bc52 commit 594b0dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions macports-installed.el
Original file line number Diff line number Diff line change
Expand Up @@ -284,19 +284,19 @@ Acts within the region when active, otherwise on entire buffer."
(when (macports-installed--prompt-transaction-p uninstall deactivate activate requested unrequested)
(let ((uninstall-cmd (when uninstall
(macports-core--privileged-command
`("-N" "uninstall" ,@(macports-installed--list-to-args uninstall)))))
`("-q" "uninstall" ,@(macports-installed--list-to-args uninstall)))))
(deactivate-cmd (when deactivate
(macports-core--privileged-command
`("-N" "deactivate" ,@(macports-installed--list-to-args deactivate)))))
`("-q" "deactivate" ,@(macports-installed--list-to-args deactivate)))))
(activate-cmd (when activate
(macports-core--privileged-command
`("-N" "activate" ,@(macports-installed--list-to-args activate)))))
`("-q" "activate" ,@(macports-installed--list-to-args activate)))))
(requested-cmd (when requested
(macports-core--privileged-command
`("-N" "setrequested" ,@(macports-installed--list-to-args requested)))))
`("-q" "setrequested" ,@(macports-installed--list-to-args requested)))))
(unrequested-cmd (when unrequested
(macports-core--privileged-command
`("-N" "unsetrequested" ,@(macports-installed--list-to-args unrequested))))))
`("-q" "unsetrequested" ,@(macports-installed--list-to-args unrequested))))))
(macports-core--exec
(string-join
(remq nil (list uninstall-cmd deactivate-cmd activate-cmd requested-cmd unrequested-cmd))
Expand Down
10 changes: 5 additions & 5 deletions test/macports-installed-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@
t))
((symbol-function #'macports-core--exec)
(lambda (cmd &rest _)
(should (equal (concat "sudo port -N uninstall piyo @2.0.1 && "
"sudo port -N deactivate foobar @1.0_0 && "
"sudo port -N activate hogefuga @123_4 && "
"sudo port -N setrequested bizzbazz @0.1_0 && "
"sudo port -N unsetrequested bazinga @20220426+blah")
(should (equal (concat "sudo port -q uninstall piyo @2.0.1 && "
"sudo port -q deactivate foobar @1.0_0 && "
"sudo port -q activate hogefuga @123_4 && "
"sudo port -q setrequested bizzbazz @0.1_0 && "
"sudo port -q unsetrequested bazinga @20220426+blah")
cmd)))))
(macports-installed)
(macports-installed-mark-toggle-requested)
Expand Down

0 comments on commit 594b0dc

Please sign in to comment.