Skip to content

Commit

Permalink
Fix paths in nushell quitcd script
Browse files Browse the repository at this point in the history
This set the correct path to the temp nnn file when XDG_CONFIG_HOME is set. It fixes jarun#1605
  • Loading branch information
mmai authored Mar 7, 2023
1 parent 9656c80 commit eaffd31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misc/quitcd/quitcd.nu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
let cfgHome = ($env | default $env.HOME XDG_CONFIG_HOME | get XDG_CONFIG_HOME)
let-env NNN_TMPFILE = $"($cfgHome)/.config/nnn/.lastd"
let cfgHome = ($env | default $"($env.HOME)/.config" XDG_CONFIG_HOME | get XDG_CONFIG_HOME)
let-env NNN_TMPFILE = $"($cfgHome)/nnn/.lastd"

def-env n [...x] {
# Launch nnn. Add desired flags after `^nnn`, ex: `^nnn -eda ($x | str join)`
Expand Down

0 comments on commit eaffd31

Please sign in to comment.