autojump
autojump copied to clipboard
Unsupported shell (tcsh). Only Bash and Zsh shells are supported.
How to proceed? $~/autojump/autojump_v21.1.2 $ chmod +x install.sh $./install.sh Unsupported shell (tcsh). Only Bash and Zsh shells are supported
tcsh is not supported. The shell wrappers requires a cd hook and a couple of functions (look at autojump.bash as an example). I'd be happy to merge a PR if you or someone adds support.
There is an autojump.tcsh file that you can source that provides basic functionality. However, the installation script needs to be run under bash or zsh, so you may want to try using a package manager or start a bash shell just to run that one script.
I believe it is possible now to install tool under tcsh w/o the need to use bash? I can seem to do it with no problems. Issue comes later, as the line the tool says to add on tcshrc "[[ ...."" does not use a valid tcsh syntax.
I believe it is possible now to install tool under tcsh w/o the need to use bash? I can seem to do it with no problems. Issue comes later, as the line the tool says to add on tcshrc "[[ ...."" does not use a valid tcsh syntax.
How do I do this exactly? I've installed autojump but when I added "[ -f /home/username/.linuxbrew/etc/profile.d/autojump.sh ] && . /home/username/.linuxbrew/etc/profile.d/autojump.sh" into my .tcshrc, it then returns me "BASH: undefined variable". I'm not very familiar with tcsh syntax, but I even tried putting the code in autojump.tcsh in my .tcshrc and it still did not work.
Hi, I was referring to above's comment : "However, the installation script needs to be run under bash or zsh, so you may want to try using a package manager or start a bash shell just to run that one script.". Basically that it can be installed but, as you well say, it doesn't work later.
There is an autojump.tcsh file that you can source that provides basic functionality. However, the installation script needs to be run under bash or zsh, so you may want to try using a package manager or start a bash shell just to run that one script.
Hi, I was referring to above's comment : "However, the installation script needs to be run under bash or zsh, so you may want to try using a package manager or start a bash shell just to run that one script.". Basically that it can be installed but, as you well say, it doesn't work later.
@jkuan can you provide a tutorial on how I can use bash to install this on my tcsh?
Hi, I was referring to above's comment : "However, the installation script needs to be run under bash or zsh, so you may want to try using a package manager or start a bash shell just to run that one script.". Basically that it can be installed but, as you well say, it doesn't work later.
After several days of trying, I finally found out how it could be made to work:
- You have to have bash
- On your .tcshrc add:
alias jt "bash -c '. ~/.bashrc; j \!:1'"
alias j 'cd `jt \!:1`'
BUT this does mean that you have to add
[ -f /home/username/etc/profile.d/autojump.sh ] && . /home/username/etc/profile.d/autojump.sh
to your .bashrc first(as specified by the installer program after installing autojump on bash).
Thanks for the update @digitalguy99 !
However it doesn't work for me. I am getting a Bad ! arg selector error message
The steps I followed are :
- install using bash called from tcsh shell. That is to say bash is not a login shell
- add "[ -f /home/username/etc/profile.d/autojump.sh ] && . /home/username/etc/profile.d/autojump.sh" to .bashrc
- addding the mentioned alias to tcsh
- Are you also using tcsh as your login shell? did you install autojump just by calling bash from tcsh?
- note that you wrote one "[" instead of "[[", is this deliberate?
thanks
@kiteloopdesign try adding
pwd_alias(){
echo "$PWD"
}
to your .bashrc.
Then, create an autojump.tcsh file somewhere(preferably on your home directory). The code on your autojump.tcsh file should be as follows:
bash -c '. ~/.bashrc; autojump -a `pwd_alias`'
Finally, add
alias cwdcmd ~/folder_that_contains/autojump.tcsh
to your .tcshrc
Thats a good idea actually to wrap bash functions into tcsh
you don't even need the autojump.tcsh file, you can directly have that in the .tcshrc
alias cwdcmd 'bash -c "source ~/.bashrc; autojump -a `pwd_alias`"'