diff --git a/home/nogui/nushell/autoload/scratch.nu b/home/nogui/nushell/autoload/scratch.nu deleted file mode 100644 index d4ee3df3ee2d69cab96be9ee1e745a8eb7d42d66..0000000000000000000000000000000000000000 --- a/home/nogui/nushell/autoload/scratch.nu +++ /dev/null @@ -1,15 +0,0 @@ -module scratch { - # Make a throwaway buffer - export def --env main [ - --description(-d): string # Optional filename description for identifying - extension?: string = "txt" # File extension (for highlighting) - ]: nothing -> nothing { - mut name = "tmp" - if $description != null { - $name = $description - } - let tmp = mktemp --tmpdir --suffix $".($extension)" $"($name).XXX" - ^$env.EDITOR $tmp - } -} -use scratch * diff --git a/home/nogui/nushell/autoload/tmp.nu b/home/nogui/nushell/autoload/tmp.nu index 67b4fd08ff2ec2e0ae0761bc896612c14f287d6c..003cff4384e2dc97b1a9115c8d3a32f4f6ee2764 100644 --- a/home/nogui/nushell/autoload/tmp.nu +++ b/home/nogui/nushell/autoload/tmp.nu @@ -1,13 +1,7 @@ module tmp { # Create a temporary directory and cd in to it - export def --env main [ - --description(-d): string # Optional filename description for identifying - ]: nothing -> nothing { - mut name = "tmp" - if $description != null { - $name = $description - } - let t = mktemp --directory $"($name).XXX" + export def --env main []: nothing -> nothing { + let t = mktemp --directory cd $t } }