-
-
Save wiedzmin/205318ef44250a88f839cc23f9fcc9fd to your computer and use it in GitHub Desktop.
Standalone Dired launcher
This file contains 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