From 9e659123cdd63a9f8741be54a649e749f154d02d Mon Sep 17 00:00:00 2001 From: Dan-Gamin <58695417+Dan-Gamin@users.noreply.github.com> Date: Thu, 5 May 2022 01:13:34 +0300 Subject: [PATCH] Explain how to run aliased paths. --- book/aliases.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/book/aliases.md b/book/aliases.md index 6227e28e9ee..d4b39c624d5 100644 --- a/book/aliases.md +++ b/book/aliases.md @@ -36,6 +36,20 @@ Here is an alias with more than one pipe alias lt = (ls | sort-by modified -r | sort-by type) ``` +## Path Aliases + +You may want to add paths to executables as aliases. In order to do this you can use the `run-external` command to run the program. + +Here is an alias that will run Firefox (on Windows): + +``` +alias firefox = run-external 'C:\Program Files\Mozilla Firefox\firefox.exe' +``` + + + +_Note: The terminal may for the program to exit before continuing._ + ## Persisting To make your alias persistent it must be added to your _config.nu_ file.