Mon système est ArchLinux, installation autojump par pacman.
Profil avec oh-my-zsh, mais je ne peux pas configurer à quel point c'est bon
➜ /home/king >autojump
/home/king/AndroidStudioProjects/yjy-android
➜ /home/king >autojump -s
10.0: /home/king/.AndroidStudio1.5/config
10.0: /home/king/.oh-my-zsh
10.0: /home
10.0: /home/king/GitProjects/dash-to-dock
10.0: /home/king/back
10.0: /home/king/usb
10.0: /home/king/autojump
14.1: /home/king/PythonProjects
14.1: /usr/share/zsh/functions/Zle
14.1: /home/king/vimtest
14.1: /home/king/GitProjects
14.1: /home/king/android/.repo
14.1: /home/king/.AndroidStudio1.5
17.3: /home/king/Downloads/genymotion
24.5: /home/king/android
28.3: /home/king/AndroidStudioProjects
37.4: /home/king/Downloads
44.7: /home/king/AndroidStudioProjects/yjy-android
________________________________________
307: total weight
18: number of entries
0.00: current directory weight
data: /home/king/.local/share/autojump/autojump.txt
➜ /home/king >autojump -v
autojump v22.2.4
dans le .zshrc
[[ -s /etc/profile.d/autojump.zsh ]] && source /etc/profile.d/autojump.zsh
plugins=(git autojump)
Je suis sûr que ces fichiers sont présents
➜ /home/king >ls /etc/profile.d
android-sdk.csh autojump.fish jre.csh perlbin.csh
android-sdk-platform-tools.csh autojump.sh jre.sh perlbin.sh
android-sdk-platform-tools.sh autojump.zsh locale.sh vte.sh
android-sdk.sh gpm.sh mozilla-common.csh
autojump.bash gradle.sh mozilla-common.sh
Mon autre ordinateur est normal, et je ne comprends pas pourquoi donc
Même problème actuellement. Fedora en cours d'exécution 23.
Veuillez lire la section d' utilisation ou les pages de manuel.
@wting J'ai lu, mais le problème persiste. Impossible d'accéder au répertoire, il n'imprimera que le répertoire
➜ ~ j yjy
/home/king/AndroidStudioProjects/yjysh
➜ ~ j -v
autojump v22.3.0
➜ ~ j -s
10.0: /home/king/AndroidStudioProjects/yjysh
10.0: /home/king/gitProjects/autojump
10.0: /home/king/gitProjects
________________________________________
30: total weight
3: number of entries
0.00: current directory weight
data: /home/king/.local/share/autojump/autojump.txt
Cela concerne #154, mais gardons la conversation ici. @turing-king : Essayez ceci :
$ echo $SHELL
$ which j
$ declare -f j
@wting
➜ yjysh git:(release) ✗ echo $SHELL
/bin/zsh
➜ yjysh git:(release) ✗ which j
j: aliased to autojump
➜ yjysh git:(release) ✗ declare -f j
j () {
if [[ ${1} = -* ]] && [[ ${1} != "--" ]]
then
autojump ${@}
return
fi
setopt localoptions noautonamedirs
local output="$(autojump ${@})"
if [[ -d "${output}" ]]
then
if [ -t 1 ]
then
echo -e "\\033[31m${output}\\033[0m"
else
echo -e "${output}"
fi
cd "${output}"
else
echo "autojump: directory '${@}' not found"
echo "\n${output}\n"
echo "Try \`autojump --help\` for more information."
false
fi
}
j
ne doit pas être un alias de autojump
, il remplace la fonction shell j
.
@wting L'utilisation directe n'a aucun effet
➜ ~ autojump -s
10.0: /home/king/gitProjects/autojump
10.0: /home/king/gitProjects
10.0: /home/king/AndroidStudioProjects
17.3: /home/king/AndroidStudioProjects/yjysh
________________________________________
47: total weight
4: number of entries
0.00: current directory weight
data: /home/king/.local/share/autojump/autojump.txt
➜ ~ autojump yjy
/home/king/AndroidStudioProjects/yjysh
➜ ~ declare -f autojump
➜ ~
Vous n'êtes pas censé l'utiliser directement, vous êtes censé utiliser la fonction j
pour accéder aux répertoires précédemment visités.
@wting Merci ~
J'ai encore ce problème
echo $SHELL
retour /bin/bash
which j
ne renvoie rien
declare -f j
renvoie la fonction j
Est-ce que quelqu'un peut m'aider ?
@tuananh comment initialiser autojump ? Voici ce que j'ai dans mon fichier shell rc (distribution Fedora):
[[ -s /etc/profile.d/autojump.sh ]] && source /etc/profile.d/autojump.sh
Commentaire le plus utile
Vous n'êtes pas censé l'utiliser directement, vous êtes censé utiliser la fonction
j
pour accéder aux répertoires précédemment visités.