gmic icon indicating copy to clipboard operation
gmic copied to clipboard

(Minor) Feature Request: Current Path Variable

Open Reptorian1125 opened this issue 1 year ago • 2 comments

Looking at substitution rule, there doesn't seem to be the current path variable. This is useful in case of files command.

So my idea is simply this:

$_path: String that returns current location. (CLI)

But, again, this is minor, and not really all that needed, but it's a idea.

Also, I searched updatexxxx.gmic with regex parameter \b\$_path\b, it's not used either.

In case of GUI plugin, it would be the same as $_path_rc or nan. Either works.

I found this BTW: https://en.cppreference.com/w/cpp/filesystem/current_path

Reptorian1125 avatar May 21 '24 19:05 Reptorian1125

Does this solve your problem ?

https://gmic.eu/reference/path_current

dtschump avatar May 23 '24 09:05 dtschump

No.

C:\Windows\System32>gmic echo ${-path_current}
[gmic]./ Start G'MIC interpreter (v.3.3.6).
./
[gmic]./ End G'MIC interpreter.

C:\Windows\System32>cd %gmic%

C:\Users\User\Pictures\gmic-qt-data>gmic echo ${-path_current}
[gmic]./ Start G'MIC interpreter (v.3.3.6).
./
[gmic]./ End G'MIC interpreter.

Reptorian1125 avatar May 25 '24 18:05 Reptorian1125

Ok, it actually worked!

C:\Users\User\Pictures\gmic-qt-data>gmic echo ${files\ 2,${-path_current}}
[gmic]./ Start G'MIC interpreter (v.3.3.6).
[gmic]./*substitute/ Get list of files and folders from location './'.
2cba2f7d46a3f67.png,Digit Sorting,FFT_filter_test,IAM problem,Mondo_Intro.png,Output Pictures,Test Files,alpha_images,big_alpha_image,blessing.cimg,blood_vessel,carout.png,cartest.png,dir_test,gui_rep_form_pixel_20221120-T132611.png,obj_test,photomosaic,track_template.png,tracks
[gmic]./ End G'MIC interpreter

Closing this.

Reptorian1125 avatar May 27 '24 20:05 Reptorian1125