title: Bash script - string with spaces as a single argument
body: <p>This isn't all I'm doing in my real application, but it boils down to this:</p>
  
  <p>I have a function that returns stuff with a space in it. I want to be able to call the function and have the contents be interpreted as a single argument, and I want to do this in the cleanest / shortest way possible.</p>
  
  <p>For example:</p>
  
  <pre><code>sp() {
      echo "hello world"
  }
  echo `sp`         # two arguments to echo, BAD
  echo $(sp)        # two arguments to echo, BAD
  echo "$(sp)"      # one argument to echo, GOOD, but this takes a lot of characters
  </code></pre>
  
  <p>Is there any shorter / cleaner way to achieve what I want to do? I'm looking for something that's easier to type (4 extra characters is a lot). Perhaps some features that are not part of <code>sh</code>, but maybe <code>bash</code> or <code>zsh</code>? This sounds horrible, but because this is going to be typed into an interactive session, so perhaps some way to hook into the shell and modify the command line before it is executed?</p>