I just recently discovered fish, and I'm loving it. Syntax
highlighting is amazing, and I'm really liking the little descriptions
attached to tab completion entries.
While tweaking my prompt display, I discovered a bug with the way fish
handles multi-line commands in shell scripts.
** Ubuntu Feisty
** Fish: 1.22.1-2
Basically in Bash and Zsh you can have commands spanning multiple
lines, you just need to end each continuation line with a '\'
character.
Both bash and zsh seem to just concatenate multiple lines together and
treat them as a single line. Fish seems to parse each line as a single
line command.
Eg.
> printf '[EMAIL PROTECTED]:%s> \n' \
`date "+%H:%M:%S"` \
`whoami` \
`hostname | cut -d . -f 1` \
`pwd`
works in dash, bash and zsh. The equivalent in fish:
> printf '[EMAIL PROTECTED]:%s> \n' \
(date "+%H:%M:%S") \
(whoami) \
(hostname | cut -d . -f 1) \
(pwd)
fails with:
fish: Illegal command name '(date "+%H:%M:%S")'
/home/wstfgl/test (line 2): (date "+%H:%M:%S") \
^
fish: Illegal command name '(whoami)'
/home/wstfgl/test (line 3): (whoami) \
^
fish: Illegal command name '(hostname | cut -d . -f 1)'
/home/wstfgl/test (line 4): (hostname | cut -d . -f 1) \
^
fish: Illegal command name '(pwd)'
/home/wstfgl/test (line 5): (pwd)
^
fish: Error while reading file /home/wstfgl/test
*** This only seems to happen with command substitution.
> echo blah \
echo foo
works, but outputs
blah echo foo
on posix shells, and
blah
foo
on fish
Thanks,
- Lixin C
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users