method
install_builtin_commands
v1_9_3_392 -
Show latest stable
- Class:
Shell::CommandProcessor
install_builtin_commands()public
define default builtin commands
# File lib/shell/command-processor.rb, line 558
def self.install_builtin_commands
# method related File.
# (exclude open/foreach/unlink)
normal_delegation_file_methods = [
["atime", ["FILENAME"]],
["basename", ["fn", "*opts"]],
["chmod", ["mode", "*FILENAMES"]],
["chown", ["owner", "group", "*FILENAME"]],
["ctime", ["FILENAMES"]],
["delete", ["*FILENAMES"]],
["dirname", ["FILENAME"]],
["ftype", ["FILENAME"]],
["join", ["*items"]],
["link", ["FILENAME_O", "FILENAME_N"]],
["lstat", ["FILENAME"]],
["mtime", ["FILENAME"]],
["readlink", ["FILENAME"]],
["rename", ["FILENAME_FROM", "FILENAME_TO"]],
# ["size", ["FILENAME"]],
["split", ["pathname"]],
["stat", ["FILENAME"]],
["symlink", ["FILENAME_O", "FILENAME_N"]],
["truncate", ["FILENAME", "length"]],
["utime", ["atime", "mtime", "*FILENAMES"]]]
def_builtin_commands(File, normal_delegation_file_methods)
alias_method :rm, :delete
# method related FileTest
def_builtin_commands(FileTest,
FileTest.singleton_methods(false).collect{|m| [m, ["FILENAME"]]})
end Related methods
- Instance methods
- []
- append
- cat
- check_point
- concat
- echo
- expand_path
- find_system_command
- finish_all_jobs
- foreach
- glob
- mkdir
- notify
- open
- out
- rehash
- rmdir
- system
- tee
- test
- top_level_test
- transact
- unlink
- Class methods
- add_delegate_command_to_shell
- alias_command
- alias_map
- def_builtin_commands
- def_system_command
- initialize
- install_builtin_commands
- install_system_commands
- method_added
- new
- run_config
- unalias_command
- undef_system_command