bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: i want HARD SPACES for dealing with function passing...


From: Stig Hackvän
Subject: Re: i want HARD SPACES for dealing with function passing...
Date: Mon, 20 Aug 2001 18:48:13 -0700
User-agent: Mutt/1.2.5i

another option:  "$@?" could replace internal spaces with question
marks...which should work 99% of the time.  (kludge, though)


> Description:
> 
> it's hell dealing with filenames with embedded spaces.  if you're trying to 
> pass them in and out of functions.  this is incredibly common if you save 
> files via samba from windows where spaces are common.
>
> Repeat-By:
> 
> touch foo\ bar
> passargs() { echo "$@"; }
> ls $(passargs foo\ bar)
> 
> Fix:
> 
> options:
> 
> new variable HS (default = \177) for hardspace character
> set option 'hs' to enable automatic [un]mangling (default to yes)
> 
> 1.  upon initial command-line parsing, convert "foo bar" to "foo${HS}bar"
>     unmangle upon command external execution
> 
> 2.  expand "$@" with $HS replacing all internal spaces.
>   
> 3.  allow return to take string args (work like echo, but returns multiple 
> args instead of a string parsed by IFS)
> 
> 

-- 
Stig Hackvän     ... http://brainofstig.ai  ...  707-987-3236 work@home
Friend of Hacking  ... http://hackvan.com ...  415-264-8754 mobile

   ...every day, computers are making people easier to use...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]