From 819a3b7c2e72a4b371430d336b32202a1b1ac075 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Thu, 20 Feb 2020 21:16:38 +0000 Subject: [PATCH] fish: Add run command to run a command in the bg This is more convenient than "command & disown". --- config/fish/completions/run.fish | 1 + config/fish/fish_variables | 1 + config/fish/functions/run.fish | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 config/fish/completions/run.fish create mode 100644 config/fish/functions/run.fish diff --git a/config/fish/completions/run.fish b/config/fish/completions/run.fish new file mode 100644 index 0000000..425184a --- /dev/null +++ b/config/fish/completions/run.fish @@ -0,0 +1 @@ +complete -c run -a '(__fish_complete_subcommand)' diff --git a/config/fish/fish_variables b/config/fish/fish_variables index a782df8..9dfe98c 100644 --- a/config/fish/fish_variables +++ b/config/fish/fish_variables @@ -36,6 +36,7 @@ SETUVAR fish_color_user:00ff00 SETUVAR fish_color_valid_path:normal SETUVAR fish_color_vcs:43d696 SETUVAR fish_color_vcs_braces:29bc7d +SETUVAR fish_escape_delay_ms:300 SETUVAR fish_greeting: SETUVAR fish_key_bindings:fish_default_key_bindings SETUVAR fish_pager_color_completion:normal diff --git a/config/fish/functions/run.fish b/config/fish/functions/run.fish new file mode 100644 index 0000000..9add662 --- /dev/null +++ b/config/fish/functions/run.fish @@ -0,0 +1,9 @@ +function run + if test (count $argv) = 0 + echo "Usage: run command" + return 1 + end + + $argv & + disown +end