title: Getting current file name in Lua
body: <p>How to get current file name without path and .lua?</p>
  
  <p>I tried with:</p>
  
  <pre><code>local info = debug.getinfo(1,'S');
  print(info.source);
  </code></pre>
  
  <p>and this is what I get:</p>
  
  <pre><code>@data/spells/scripts/10lvl/bakurichimacha.lua
  @data/spells/scripts/1000lvl/brave sword attack.lua
  </code></pre>
  
  <p>How to delete these parts:</p>
  
  <pre><code>@data/spells/scripts/10lvl/ and .lua
  @data/spells/scripts/1000lvl/ and .lua
  </code></pre>
  
  <p>To print just bakurichimacha and brave sword attack?</p>