Last active
February 1, 2021 13:36
-
-
Save Metaxal/31859c787804b4e40a1b2154172edcc3 to your computer and use it in GitHub Desktop.
A quickscript to rename the current tab file (like Save as but also deletes the original file)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or | |
;; [MIT license](http://opensource.org/licenses/MIT) at your option. | |
(require quickscript | |
racket/class) | |
(script-help-string "Like 'Save as…' but also deletes the original file (unless cancelled)") | |
(define-script rename-file | |
#:label "Rename file…" | |
#:menu-path ("&Utils") | |
(λ (selection #:file f #:definitions defs #:frame fr) | |
(when (and f (send fr save-as 'same)) | |
(delete-file f)) | |
#f)) | |
(module url2script-info racket/base | |
(provide filename url) | |
(define filename "rename-file.rkt") | |
(define url "https://gist.github.com/Metaxal/31859c787804b4e40a1b2154172edcc3")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment