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

Version Path
rbbt-util-5.44.1 share/rbbt_commands/alias
rbbt-util-5.43.0 share/rbbt_commands/alias
rbbt-util-5.42.0 share/rbbt_commands/alias
rbbt-util-5.41.1 share/rbbt_commands/alias
rbbt-util-5.41.0 share/rbbt_commands/alias
rbbt-util-5.40.5 share/rbbt_commands/alias
rbbt-util-5.40.4 share/rbbt_commands/alias
rbbt-util-5.40.3 share/rbbt_commands/alias
rbbt-util-5.40.0 share/rbbt_commands/alias
rbbt-util-5.39.0 share/rbbt_commands/alias
rbbt-util-5.38.1 share/rbbt_commands/alias
rbbt-util-5.38.0 share/rbbt_commands/alias
rbbt-util-5.37.16 share/rbbt_commands/alias
rbbt-util-5.37.15 share/rbbt_commands/alias
rbbt-util-5.37.14 share/rbbt_commands/alias
rbbt-util-5.37.13 share/rbbt_commands/alias
rbbt-util-5.37.12 share/rbbt_commands/alias
rbbt-util-5.37.11 share/rbbt_commands/alias
rbbt-util-5.37.10 share/rbbt_commands/alias
rbbt-util-5.37.9 share/rbbt_commands/alias