Last active
April 4, 2021 09:37
-
-
Save alphapapa/9c4eea0f204f865d37e8c99963feb922 to your computer and use it in GitHub Desktop.
Standalone Dired launcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Launch Dired in a plain Emacs configuration. | |
# Arguments are passed to Emacs, e.g. "-nw" works as expected. | |
emacs -q "$@" \ | |
--eval "(dired default-directory)" \ | |
--eval "(defun kill-window-or-emacs () (interactive) (if (one-window-p) (kill-emacs) (delete-window)))" \ | |
--eval "(setq dired-dwim-target t delete-by-moving-to-trash t)" \ | |
--eval "(define-key dired-mode-map (kbd \"q\") #'kill-window-or-emacs)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment