~ivy-read -> completing-read
More general purpose and useful
This commit is contained in:
14
Install.org
14
Install.org
@@ -26,19 +26,13 @@ The main function used to retrieve all the stowable modules in the Dotfiles dire
|
|||||||
** Stow module
|
** Stow module
|
||||||
Little elisp snippet to stow a specific module in the Dotfiles folder using ivy.
|
Little elisp snippet to stow a specific module in the Dotfiles folder using ivy.
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(ivy-read
|
(async-shell-command (format "stow %s" (completing-read "Stow module: " (get-modules) nil t)) "*stow-output*" "*stow-error*")
|
||||||
"Stow module: "
|
|
||||||
(get-modules)
|
|
||||||
:require-match t
|
|
||||||
:action (lambda (choice) (async-shell-command (format "stow %s" choice) "*stow-output*" "*stow-error*")))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Delete module
|
** Delete module
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(ivy-read
|
(async-shell-command
|
||||||
"Delete module: "
|
(format "stow -D %s" (completing-read "Delete module: " (get-modules) nil t))
|
||||||
(get-modules)
|
"*stow-output*" "*stow-error*")
|
||||||
:require-match t
|
|
||||||
:action (lambda (choice) (async-shell-command (format "stow -D %s" choice) "*stow-output*" "*stow-error*")))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Generate user directories
|
* Generate user directories
|
||||||
This makes some useful directories that are used by the system and/or by me. I
|
This makes some useful directories that are used by the system and/or by me. I
|
||||||
|
|||||||
Reference in New Issue
Block a user