From c01857cddbc18798571f6d382e01e842684a491a Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Tue, 31 Mar 2020 22:26:20 +0530 Subject: Fix fzcd at /, minot refactor --- plugins/fzcd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/fzcd') diff --git a/plugins/fzcd b/plugins/fzcd index 9e93969..5e0b5f0 100755 --- a/plugins/fzcd +++ b/plugins/fzcd @@ -32,5 +32,9 @@ if [ -n "$sel" ]; then # Remove "./" prefix if it exists sel="${sel#./}" - nnn_cd "$PWD/$sel" + if [ "$PWD" = "/" ]; then + nnn_cd "/$sel" + else + nnn_cd "$PWD/$sel" + fi fi -- cgit v1.2.3-70-g09d2