Sha256: 970bea358d9ad5b65b74f8da4b39b11ed17767ddbaa4369d50ecd57d99d21c95
Contents?: true
Size: 456 Bytes
Versions: 772
Compression:
Stored size: 456 Bytes
Contents
#!/usr/bin/env ruby require 'rbbt' cmd, *rest = ARGV aliases ||= Rbbt.etc.cmd_alias.exists? ? Rbbt.etc.cmd_alias.yaml : {} if cmd.nil? aliases.each do |name, parts| parts = parts.collect{|p| p =~ /^[\w:_\/-]*$/ ? p : "'" << p << "'" } puts [Log.color(:magenta, name), parts * " "] * ": " end exit 0 end if rest.empty? aliases.delete cmd else aliases[cmd] = rest end Open.write(Rbbt.etc.cmd_alias.find,(aliases.to_yaml))
Version data entries
772 entries across 772 versions & 1 rubygems