るりまサーチ

最速Rubyリファレンスマニュアル検索!
6件ヒット [1-6件を表示] (0.092秒)
トップページ > クエリ:t[x] > クラス:Shell[x] > クエリ:alias_command[x]

別のキーワード

  1. psych alias
  2. alias new
  3. alias anchor=
  4. alias anchor
  5. rdoc/alias alias

ライブラリ

検索結果

Shell.alias_command(alias, command, *opts) {...} -> self (18208.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", "ls", "-a", "-l")
Shell
.def_system_command("sort")
sh = Shell.new
sh.transact {
(lsla | sort("-k 5")).each {|l|
puts l
}
}...