6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

環境変数PATHが長すぎて、追加したパスが有効にならないぜ!

Posted at

ならば削ればよかろうなのだッ。

グローバルな %PATH% から削ると問題でそうなので、コマンドラインから呼び出しそうにないパスだけ、.nyagos で削ればよいのだ。

%USERPRFILE%.nyagos
-- Remove %PATH%
do
    local paths = {}
    for dir in string.gmatch(nyagos.env.path,"[^;]+") do
        if not string.find(dir,"Intel") and 
            not string.find(dir,"Lenovo",1,true) and
            not string.find(dir,"Skype",1,true) and
            not string.find(dir,"SQL Server",1,true) and
            not string.find(dir,"TypeScript",1,true) and
            not string.find(dir,"Performance",1,true) and
            not string.find(dir,"Windows Kits",1,true) then
            paths[#paths+1] = dir
        end
    end
    nyagos.env.path = table.concat(paths,";")
end
  • 4.0.9 の nyagos では環境変数を nyagos.env.xxxxx といった形で「読書き」できる(大文字・小文字も区別しない)
  • nyagos限定の記事でも、タグを「nyagos」だけに限れば、関心ない人のタイムライン汚さないよね(まぁ、ストック数はゼロだろうけど、気にしないようにしよう。それよりも「情報がない」とか言われる方がアレだから)
6
6
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?