From a414fefa03d2fadd17806d94786a085f5f4b0012 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Wed, 3 Apr 2019 17:21:23 +0100 Subject: [PATCH] Reintroduce nohup to browse function Updates the implementation to ensure that the nohup.txt file isn't created. --- configs/shared/zsh/functions.zsh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/configs/shared/zsh/functions.zsh b/configs/shared/zsh/functions.zsh index c0f6e21e4..6aa7da46d 100644 --- a/configs/shared/zsh/functions.zsh +++ b/configs/shared/zsh/functions.zsh @@ -375,7 +375,10 @@ nix_store() { browse() { # Open a URL in $BROWSER. Friendly for terminal input and output. - "$BROWSER" $@ & + # NOTE: `nohup` ensures that if I close the terminal, I won't all kill the + # browser. Maybe this is similar to calling `disown %`. The redirect + # to `/dev/null` ensures that no `nohup.out` file is created. + nohup "$BROWSER" $@ >/dev/null 2>&1 & } lh() { @@ -600,13 +603,6 @@ tmux_focused_pane() { } # Google3 -g3_root() { - # Outputs the root of the CitC client in g3 - # NOTE: there is probably a function already supported by g4 to cd to the - # root, so support for this function may be dropped shortly. - echo "${PWD%%/google3/*}/google3" -} - p4_filelog() { # Logs a file's Piper history. This is a convenience wrapper around # `p4 filelog`.