Skip to content

Commit

Permalink
Allow negation on next patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
thierryvolpiatto committed Oct 3, 2023
1 parent f020465 commit 56970b6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions helm-apt.el
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,13 @@ Support install, remove and purge actions."
(cmd (helm-aif (cdr patterns)
(format "apt-cache search %s %s"
(car patterns)
(cl-loop for p in it concat
(format " | %s -- %s"
pipe-cmd
(shell-quote-argument p))))
(cl-loop for p in it
for no = (string-match "\\`!" p)
for pat = (shell-quote-argument
(if no (substring p 1) p))
concat
(format " | %s%s %s"
pipe-cmd (if no " -v" "") pat)))
(format "apt-cache search %s" (shell-quote-argument helm-pattern))))
(proc (start-process-shell-command
"Apt-async" nil cmd)))
Expand Down

0 comments on commit 56970b6

Please sign in to comment.