💾 Archived View for 1436.ninja › Phlog › gmi › 20231016.gmi captured on 2024-06-19 at 22:49:56. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-11-04)
-=-=-=-=-=-=-
I setup fzf as a bash history fuzzy finder recently (a month or two ago). The code that I found and used from the web included, of course, a binding to C-r to trigger this. Which set off an excited "what?" in my mind. I knew, that bash had bindings such as C-r, C-l, etc. but I never even thought of setting custom bindings.
I added a binding to C-e to start emacsclient in the current directory (dired). Here is the code to add to ~/.bashrc:
# start emacs daemon if it is not running if [[ ! $(ps -e | grep emacs) ]] ; then (emacs --daemon=ec) &> /dev/null & disown -a fi bind -x '"\C-e": emacsclient -s /var/run/user/1000/emacs/ec -c -a "" ./' # or something like this for termux... # bind -x '"\C-e": emacsclient -s /data/data/com.termux/files/usr/var/run/emacs10090/ec -c -a "" ./'
Then source your .bashrc and Bob's your uncle, ctrl e starts dired in emacsclient in the current directory. So damned nice. Apparently it doesn't take much to make me happy?