I updated Lua-script in first message: missing symbol "\\" and returning 
default list of wordchars.
___
I wrote a Lua script as module https://pastebin.com/6v5xft6R List of functions:
```
get_sel_filename()
file_is_exists(path)
path_is_absolute(path)
tidy_path(path)
```
How to use: Save as ```getselfile.lua``` in 
```~/.config/geany/plugins/geanylua/support``` (default on Linux).
Example:
```lua
-- Get the user's plugin directory and add folder "support" in "package.path"
local gi = geany.appinfo()
package.path = package.path .. ";" .. gi.scriptdir .. geany.dirsep .. "support" 
.. geany.dirsep .. "?.lua";
-- Load our module
local gsfn = require "getselfile"
-- Get selected filename
local f = gsfn.get_sel_filename();
if (f ~= nil) then geany.message(f) end;
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/786#issuecomment-439594771

Reply via email to