Skip to content

Commit

Permalink
start daemon in a different group
Browse files Browse the repository at this point in the history
  • Loading branch information
curusarn committed Dec 16, 2019
1 parent 952df41 commit e4a743b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions scripts/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ __resh_run_daemon() {
if [ -n "$ZSH_VERSION" ]; then
setopt LOCAL_OPTIONS NO_NOTIFY NO_MONITOR
fi
nohup resh-daemon >~/.resh/daemon_last_run_out.txt 2>&1 & disown
if [ "$__RESH_MACOS" = 1 ]; then
# needs testing
nohup script -q -c 'resh-daemon' ~/.resh/daemon_last_run_out.txt &
else
setsid resh-daemon > ~/.resh/daemon_last_run_out.txt 2>&1 & disown
fi
}

__resh_bash_completion_init() {
Expand All @@ -69,7 +74,13 @@ __resh_zsh_completion_init() {
# we should be using fpath but that doesn't work well with oh-my-zsh
# so we are just adding it manually
# shellcheck disable=1090
source ~/.resh/zsh_completion.d/_reshctl && compdef _reshctl reshctl
if typeset -f compdef >/dev/null 2>&1; then
source ~/.resh/zsh_completion.d/_reshctl && compdef _reshctl reshctl
else
# fallback I guess
fpath=(~/.resh/zsh_completion.d $fpath)
__RESH_zsh_no_compdef=1
fi

# TODO: test and use this
# NOTE: this is not how globbing works
Expand Down

0 comments on commit e4a743b

Please sign in to comment.