Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: joining array elements



Hi Bart,

When I removed the backslashes, I have no output. Could this problem be related to the Zsh options I have set in my environment? I have the following options set (or unset).

	setopt                         \
			auto_pushd             \
		 NO_beep                   \
			brace_ccl              \
		 NO_cdable_vars            \
		 NO_clobber                \
			complete_in_word       \
			correct_all            \
			extended_glob          \
			glob_complete          \
			glob_subst             \
			hist_allow_clobber     \
			hist_reduce_blanks     \
		 NO_hup                    \
			ignore_eof             \
			interactive_comments   \
		 NO_list_ambiguous         \
			local_options          \
			local_traps            \
			long_list_jobs         \
			magic_equal_subst      \
			null_glob              \
			path_dirs              \
			posix_builtins         \
			print_eight_bit        \
			pushd_ignore_dups      \
			pushd_minus            \
			pushd_to_home          \
			rc_expand_param        \
		 NO_sh_in_stdin            \
			share_history          \


I appreciate your help very much.

Wataru Kagawa


On 2006/01/12, at 10:41, Bart Schaefer wrote:

On Jan 12, 10:22am, Wataru Kagawa wrote:
}
} Bob[return]Sara[return]Tim
}
} as an output (without the backslashes in front of the square
} brackets).  I started out with,
}
} echo ${(j:\[return\]:)usernames}
}
} and added extra backslashes, but that did not work for me.  Help is
} greatly appreciated.

Did you try *removing* the backslashes?  This works fine for me:

echo ${(j:[return]:)usernames}

Also keep in mind that "echo" might be doing some conversions of its
own if you have anything unusual in $usernames -- you might be better
off with e.g.

print -R -- ${(j:[return]:)usernames}



Messages sorted by: Reverse Date, Date, Thread, Author