dev.fron.io rc / cf53420
emacs(shell): spicier completion Tony Olagbaiye 6 months ago
1 changed file(s) with 12 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
4141 :history 'shell-command-history))
4242 (defun ivy-shell-sync (&optional pfx)
4343 (interactive "p")
44 (ivy-shell nil :initial-input (if (= pfx -1) (car shell-command-history))))
44 (minibuffer-with-setup-hook
45 (lambda ()
46 (shell-completion-vars)
47 (setq-local minibuffer-default-add-function
48 #'minibuffer-default-add-shell-commands))
49 (ivy-shell nil :initial-input (if (= (or pfx 1) -1) (car shell-command-history)))))
4550 (global-set-key (kbd "M-!") #'ivy-shell-sync)
4651 (global-set-key (kbd "´") #'ivy-shell-sync)
4752 (evil-define-key 'normal 'global (kbd "´") #'ivy-shell-sync)
4853 (defun ivy-shell-async (&optional pfx)
4954 (interactive "p")
50 (ivy-shell t :initial-input (if (= pfx -1) (car shell-command-history))))
55 (minibuffer-with-setup-hook
56 (lambda ()
57 (shell-completion-vars)
58 (setq-local minibuffer-default-add-function
59 #'minibuffer-default-add-shell-commands))
60 (ivy-shell t :initial-input (if (= (or pfx 1) -1) (car shell-command-history)))))
5161 (global-set-key (kbd "M-&") #'ivy-shell-async)
5262 (global-set-key (kbd "`") #'ivy-shell-async)
5363 (evil-define-key 'normal 'global (kbd "`") #'ivy-shell-async)