るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.026秒)
トップページ > クエリ:-[x] > クエリ:end[x] > クエリ:shell[x] > ライブラリ:shell[x] > 種類:特異メソッド[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

クラス

キーワード

検索結果

Shell.undef_system_command(command) -> Shell::CommandProcessor (17234.0)

commandを削除します.

...指定します。

動作例:
require 'shell'
Shell
.def_system_command("ls")
# ls を定義
Shell
.undef_system_command("ls")
# ls を 削除

sh = Shell.new
begin
sh.transact {
ls("-l").each {|l|
puts l
}
}
rescue NameError => err
puts err
end
...

Shell.unalias_command(alias) -> () (17163.0)

commandのaliasを削除します.

...使用例: ls -la | sort -k 5 のような例。
require 'shell'
Shell
.def_system_command("ls")
Shell
.alias_command("lsla", "ls", "-a", "-l")
Shell
.def_system_command("sort")
sh = Shell.new
sh.transact {
(lsla | sort("-k 5")).each {|l|
puts l
}
}
Shell
.unalias_command...
...("lsla")
begin
Shell
.unalias_command("lsla")
rescue NameError => err
puts err
end
...