gmic
gmic copied to clipboard
(Minor) Feature Request: Current Path Variable
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
Does this solve your problem ?
https://gmic.eu/reference/path_current
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.
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.