mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-03 07:31:03 +01:00
services/emacs: add option to set emacsclient as the default editor (#2545)
* services/emacs: add `defaultEditor` option Sets `emacsclient` as the default editor using the `EDITOR` environment variable.
This commit is contained in:
parent
05d655146b
commit
f3be3cda6a
4 changed files with 63 additions and 1 deletions
18
tests/modules/services/emacs/emacs-default-editor.sh
Normal file
18
tests/modules/services/emacs/emacs-default-editor.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
set +u
|
||||
source $TESTED/home-path/etc/profile.d/hm-session-vars.sh
|
||||
set -u
|
||||
|
||||
check_arguments () {
|
||||
if [ "$1" != "$2" ]; then
|
||||
@coreutils@/bin/cat <<- EOF
|
||||
Expected arguments:
|
||||
$1
|
||||
but got:
|
||||
$2
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_arguments "--create-frame" "$($EDITOR)"
|
||||
check_arguments "foo bar baz" "$($EDITOR foo bar baz)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue