`which ls` returns nothing SOLVED
I’m not sure if this is a bug or if I have configured something incorrectly.
$ which ls
(returns nothing)
$ which cp
/var/run/current-system/sw/bin/cp$ ls -l /var/run/current-system/sw/bin/ls
lrwxrwxrwx 1 root nixbld 64 Nov 22 22:26 /var/run/current-system/sw/bin/ls -> /nix/store/sa2w035ha33hkkiw10928sbjgpg0dkx1-coreutils-8.4/bin/ls$ ls -l /var/run/current-system/sw/bin/cp
lrwxrwxrwx 1 root nixbld 64 Nov 22 22:26 /var/run/current-system/sw/bin/cp -> /nix/store/sa2w035ha33hkkiw10928sbjgpg0dkx1-coreutils-8.4/bin/cp$ echo $PATH
/root/bin:/var/setuid-wrappers:/root/.nix-profile/bin:/root/.nix-profile/sbin:/root/.nix-profile/lib/kde4/libexec:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/nix/var/nix/profiles/default/lib/kde4/libexec:/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin:/var/run/current-system/sw/lib/kde4/libexecThe end effect of this is that I cannot use tramp mode in emacs to work as the root user because it can’t find
Submitted by Cillian de Róiste on 26 November 2010 at 01:49ls
.
Issue Log
Thanks to viric on irc …
bothls
andwhich
have aliases:
$ alias
alias l=‘ls -alh’
alias ll=‘ls -l’
alias which=‘type -p’so installing the which package also doesn’t help here.
changing the alias type -P means that the which alias works, but emacs tramp is still not happy, will investigate further
The alias has already been fixed.
To configure emacs so that it finds
ls
andid
(and possibly more) you can add the following to your ~/.emacs(require ’tramp)
(add-to-list ’tramp-remote-path “/var/run/current-system/sw/bin”)
Log in to post comments