pathname icon indicating copy to clipboard operation
pathname copied to clipboard

A means to add an extension

Open akimd opened this issue 1 year ago • 0 comments

I often need to add an extension (be it .tmp or .bak for example).

Writing path.sub_ext("#{path.extname}.tmp") is weird. Likewise for path.sub(/\z/, '.tmp'). And unfortunately + and / have exactly the same semantics, so I can't use that either.

I wish I had add_ext.

Cheers!

akimd avatar Feb 17 '25 10:02 akimd