Skip to content

Instantly share code, notes, and snippets.

@luluco250
Last active March 8, 2023 13:00
Show Gist options
  • Save luluco250/7f38c1ab332153488f22c3b0eb32e0cf to your computer and use it in GitHub Desktop.
Save luluco250/7f38c1ab332153488f22c3b0eb32e0cf to your computer and use it in GitHub Desktop.
Shell scripts/functions to launch GUI apps without tying them to a terminal.
#!/usr/bin/env fish
function launch --wraps exec
sh -c "(exec $(string escape $argv | string join ' ') >/dev/null 2>&1 &)"
end
#!/bin/sh
launch() {
(exec "$@" >/dev/null 2>&1 &)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment