From f6bd50a221b832c2b84570a46d76f9b8ca9daf7d Mon Sep 17 00:00:00 2001 From: Dan-Gamin <58695417+Dan-Gamin@users.noreply.github.com> Date: Sun, 29 May 2022 23:13:56 +0300 Subject: [PATCH] Create pwd-short.nu (#235) --- cool-oneliners/pwd-short.nu | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 cool-oneliners/pwd-short.nu diff --git a/cool-oneliners/pwd-short.nu b/cool-oneliners/pwd-short.nu new file mode 100644 index 0000000..f7ef9b9 --- /dev/null +++ b/cool-oneliners/pwd-short.nu @@ -0,0 +1,4 @@ +# Print working directory but abbreviates the home dir as ~ +def pwd-short [] { + $env.PWD | str replace $nu.home-path '~' -s +}