New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The path
module should have something like a mktemp
command
#1255
Comments
BTW, My function that I bind to Alt-e (
|
I sometimes wonder if it’d be useful to provide a way to write Elvish modules in Go (like how Python can load third-party modules implemented in C), so this kind of things can be experiemented on more easily. (Although |
@uranusjr, The Go plugin package would allow Elvish to load third-party modules written in Go. But it doesn't support Windows and it wouldn't make experimenting any easier. It's trivial to checkout the current Elvish code, create a new branch, and write code to implement a new feature. Using a plugin mechanism would almost certainly make the process harder, not easier. |
This is a stepping stone to implementing a `path:temp-file` command which will need a means of fetching the file name from the os.File object returned by fileutil.TempFile(). Related elves#1255
This builds on previous commits to provide a mechanism for creating a temporary file open for I/O but whose file name is available so the file can be removed. Resolves elves#1255
This is a stepping stone to implementing a `path:temp-file` command which will need a means of fetching the file name from the os.File object returned by fileutil.TempFile(). Related elves#1255
This builds on previous commits to provide a mechanism for creating a temporary file open for I/O but whose file name is available so the file can be removed. Resolves elves#1255
This implements `path:temp-dir` and `path:temp-file`. Resolves elves#1255
This implements `path:temp-dir` and `path:temp-file`. Resolves elves#1255
This implements `path:temp-dir` and `path:temp-file`. Resolves elves#1255
This implements `path:temp-dir` and `path:temp-file`. Resolves #1255
I was looking at my
external_edit_command
function and noticed I had hardcoded a /tmp/... path to avoid the pain of using the externalmktemp
command. The pain is due to the SysV, BSD, and Gnu implementations having different behavior. Not to mention creating a temp file on Windows. Apath:mktemp
command would be very useful. We don't necessarily want, or need, to mimic the existing external command but obviously do want options to create a unique directory versus a regular file and some sort of pattern mechanism to control the naming of the final component of the path.The text was updated successfully, but these errors were encountered: