1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-14 15:19:45 +01:00
home-manager/tests/modules/services/emacs/emacs-default-editor.sh
rcerc f3be3cda6a
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.
2022-01-10 02:17:13 -05:00

18 lines
316 B
Bash

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)"