def append_history(str)
      return if @options[:no_blanks] && str.strip.empty?

      if history.include?(str)
        if @options[:no_dups]
          return if @options[:no_move]

          history.delete(str)
        end
      end

      history << str
    end
def append_history(str)
      return if @options[:no_blanks] && str.strip.empty?

      if history.include?(str)
        if @options[:no_dups]
          return if @options[:no_move]

          history.delete(str)
        end
      end

      history << str
    end
Append a string to the history buffer if enabled.