AtelierArith / Replay.jl

Replay your REPL instructions
https://atelierarith.github.io/Replay.jl/dev/
MIT License
36 stars 3 forks source link

Use `cmd::Cmd` instead of `cmd::String` in `replay` funciton #62

Closed hyrodium closed 11 months ago

hyrodium commented 1 year ago

The current implementation uses cmd="--color=yes" as a keyword argument, but it seems cmd::Cmd=`--color=yes` is better because we can remove split in this line.

julia> cmd = "--color=yes -q"
"--color=yes -q"

julia> `julia $(split(cmd))`
`julia --color=yes -q`

julia> cmd = `--color=yes -q`
`--color=yes -q`

julia> `julia $cmd`
`julia --color=yes -q`
terasakisatoshi commented 1 year ago

This makes sense to me.

If this proposal is merged, I think it should be released as a v0.5 feature. This would be a destructive change for users who pass an object (type String) to the "cmd" argument.