from .core import *

import sys

def main():
    """ Entry point for cli. """
    if sys.argv[1:]:  # called with input arguments
        copy(' '.join(sys.argv[1:]))
    elif not sys.stdin.isatty():  # piped in input
        copy('\n'.join(sys.stdin.readlines()))
    else:  # paste output
        print(paste())

from .core import *

import sys
import os

def main():
    """ Entry point for cli. """
    if sys.argv[1:]:  # called with input arguments
        copy(' '.join(sys.argv[1:]))
    elif not sys.stdin.isatty():  # piped in input
        copy(''.join(sys.stdin.readlines()).rstrip(os.linesep))
    else:  # paste output
        print(paste())

Join lines without newline and remove trailing newline
Join lines without newline and remove trailing newline

  from .core import *
  
  import sys
+ import os
  
  def main():
      """ Entry point for cli. """
      if sys.argv[1:]:  # called with input arguments
          copy(' '.join(sys.argv[1:]))
      elif not sys.stdin.isatty():  # piped in input
-         copy('\n'.join(sys.stdin.readlines()))
+         copy(''.join(sys.stdin.readlines()).rstrip(os.linesep))
      else:  # paste output
          print(paste())
  
Join lines without newline and remove trailing newline
## Code Before:
from .core import *

import sys

def main():
    """ Entry point for cli. """
    if sys.argv[1:]:  # called with input arguments
        copy(' '.join(sys.argv[1:]))
    elif not sys.stdin.isatty():  # piped in input
        copy('\n'.join(sys.stdin.readlines()))
    else:  # paste output
        print(paste())

## Instruction:
Join lines without newline and remove trailing newline
## Code After:
from .core import *

import sys
import os

def main():
    """ Entry point for cli. """
    if sys.argv[1:]:  # called with input arguments
        copy(' '.join(sys.argv[1:]))
    elif not sys.stdin.isatty():  # piped in input
        copy(''.join(sys.stdin.readlines()).rstrip(os.linesep))
    else:  # paste output
        print(paste())
