Axel Liljencrantz wrote:
> Maybe it's a language thing. In swedish you'd use the word överskugga
> in this situation, meaning 'to cover something in shadow'. To me, it
> is very visual and intuitive.

nice! (I like languages often)

>>>> on the other hand, as I was mentioning, sometimes in the same given
>>>> scope, one variable is used in fish and another one in subprocesses.
>>> How do you mean this?
>> ]set -Ux test1 abc
>> ]set -gu test1 def
>> ]echo $test1
>> def
>> ]sh -c 'echo $test1'
>> abc
>>
> 
> Ah, ok. Do you think this behavior is wrong?

I haven't formed an opinion on what the "right" behavior should be... 
without examples, it seems as good as anything.

my analogy for why it's "right" already is

set -g v a

function f
   echo $v
end
function g
   set -l v b
   f
end
#g outputs a
#therefore functions are similar to commands

#But "globals" really are not quite the same as lexical scopes

#now, it's a bit odd how differently functions and
#commands are treated...
function g1
   set -lx v b
   f
end
function g2
   set -lx v b
   sh -c 'echo $v'
end
#g1 outputs a; g2 outputs b

Maybe that oddness is part of the function of a shell. Maybe commingling 
shell-programming-variables, and exported-variables, is too confusing 
always.  The proposed `cd -l` will probably have more consistent 
semantics: implicitly exported to both functions and external commands; 
dynamically scoped, lasting until the end of the function, I guess.


>> For example, I might not even have root access (although I do) (I mean,
>> I run as a normal user normally, and sudo when I need privileges).  And
>> I might want to test a development version of fish without endangering
>> the stability of all my terminal windows, certainly without using root
>> privileges, and preferably in the same general environment as the rest
>> of my user directory so I can try using it practically.
> 
> I just realised you can actually do this already. You can already
> specify different locations for the system files and the site specific
> config files using switches to the configure script. You can use the
> XDG_CONFIG_HOME directory to specify a new location for the user
> specific config files. You can use the FISHD_SOCKET_DIR environment
> varialbe to specify the filename for the fishd socket file. That
> should as far as I can see cover every single file.
> 
> And here I though fish didn't offer that many configuration options.

yes, this is interesting although it does change XDG_CONFIG_HOME for 
other apps as well, I expect... but good to know! I will consider it.


build failures:
I needed to install gettext (error about msgfmt command missing) (this 
dependency was not mentioned in INSTALL).

Installing to prefix $PWD/inst,
...
for i in fish set_color mimedb fish_pager fishd fish_indent 
xsel-0.9.6/xsel   ; do\
                 /usr/bin/install -c -m 755 $i 
/Users/me/modified/fish/inst/bin ; \
         done;
/usr/bin/install: cannot stat `xsel-0.9.6/xsel': No such file or directory
make: *** [install-force] Error 1

What? I tried creating the directory 
/Users/me/modified/fish/inst/bin/xsel-0.9.6 , and re-installing, and it 
errored in the same place.
Oh wait, I need to install the xsel package (or explicitly give 
--without-xsel).  This message at the end of 'make' is not quite right:
"
Failed to build xsel - either add the required dependencies or use 
'./configure --without-xsel' to disable it.
fish has now been built.
Use 'make install' to install fish.
"
because the last two lines obscure that the first one I quoted is in 
fact a fatal error that will prevent installation.
Also it seems I need libx11-dev, (maybe libxext-dev, maybe libice-dev... 
the latter guesses from xsel's dependencies, that didn't seem to help 
anything?)  Do you have any idea where  X11/StringDefs.h and 
X11/Intrinsic.h  are to be found? Meanwhile I'll disable xsel.


by the way, I ran into another crash -- (presumably all 
fish-stack-traces are bugs that should at least give some other error 
message?).  (but this one is fixed in darcs (I tested) so I won't 
mention it [1])

Okay, now testing
also --help.  `cd --help` coloring is fixed now, but not `pushd --help` 
and possibly a bunch of others.

also, on ubuntu, 'bash' tells you if you try to use an uninstalled 
command, what package to get it from. Of course this is the distro's 
doing... but, I wonder what sort of support it needs from fish.  Just 
using "bash -i -c 'svn'" is enough to trigger
"
The program 'svn' is currently not installed.  You can install it by typing:
sudo apt-get install subversion
bash: svn: command not found
"
which is useful information, though I guess there's a better command to 
get it from, that I just don't know about...


~Isaac


[1]
otherwise-deleted text

When fish doesn't have permission to access $HOME or related 
variables... it gets very confused.

(I'm using a Sudo version 1.6.8p12 that doesn't clean up the environment 
very much, so it inadvertantly tried to run $SHELL (fish) as a different 
user but with my $HOME)

]sudo -u east -s
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
set: Could not add component /Users/me/HOME to CDPATH.
set: Permission denied
fish: Unable to create a configuration directory for fish. Your personal 
settings will not be saved. Please set the $XDG_CONFIG_HOME variable to 
a directory where the current user has write access.
fish: escape called with null input
fish: Backtrace:
/usr/bin/fish [0x80737a2]
/usr/bin/fish [0x807425a]
/usr/bin/fish [0x8079052]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7ddd050]
/usr/bin/fish [0x804a291]


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to