6件ヒット
[1-6件を表示]
(0.348秒)
ライブラリ
- shell (4)
-
shell
/ command-processor (2)
クラス
- Shell (4)
-
Shell
:: CommandProcessor (2)
キーワード
-
alias
_ command (1) -
unalias
_ command (1) -
undef
_ system _ command (2)
検索結果
先頭5件
- Shell
. def _ system _ command(command , path = command) -> nil - Shell
:: CommandProcessor . def _ system _ command(command , path = command) -> () - Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor - Shell
:: CommandProcessor . undef _ system _ command(command) -> self - Shell
. alias _ command(alias , command , *opts) { . . . } -> self
-
Shell
. def _ system _ command(command , path = command) -> nil (54343.0) -
Shell のメソッドとして command を登録します.
Shell のメソッドとして command を登録します.
OS上のコマンドを実行するにはまず, Shellのメソッドとして定義します.
注) コマンドを定義しなくとも直接実行できる Shell#system コマンドもあります.
@param command Shell のメソッドとして定義するコマンドを文字列で指定します。
@param path command のパスを指定します。
指定しない場合はcommand と同じになります。
例)
require 'shell'
Shell.def_system_command "ls"
# ls ... -
Shell
:: CommandProcessor . def _ system _ command(command , path = command) -> () (54307.0) -
@todo
@todo
与えられたコマンドをメソッドとして定義します。
@param command 定義したいコマンドを指定します。
@param path command のパスを指定します。省略すると環境変数 PATH から command を探します。 -
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (18322.0) -
commandを削除します.
commandを削除します.
@param 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 ... -
Shell
:: CommandProcessor . undef _ system _ command(command) -> self (18304.0) -
与えられたコマンドを削除します。
与えられたコマンドを削除します。
@param command 削除したいコマンド名を指定します。 -
Shell
. alias _ command(alias , command , *opts) { . . . } -> self (88.0) -
コマンドの別名(エイリアス)を作成します。 コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.
コマンドの別名(エイリアス)を作成します。
コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.
@param alias エイリアスの名前を文字列で指定します.
@param command コマンド名を文字列で指定します.
@param opts command で指定したコマンドのオプションを指定します.
使用例: ls -la | sort -k 5 のような例。
require 'shell'
Shell.def_system_command("ls")
Shell.alias_command("lsla", "... -
Shell
. unalias _ command(alias) -> () (40.0) -
commandのaliasを削除します.
commandのaliasを削除します.
@param alias 削除したいエイリアスの名前を文字列で指定します。
@raise NameError 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.trans...