Linux中在zsh下如何安装autojump

文章目录

  • 介绍
  • 安装

介绍

autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line.
Directories must be visited first before they can be jumped to.

关于 autojump 有以下几个站点:
https://github.com/wting/autojump
https://github.com/haoziyeung/autojump
https://gitee.com/gentlecp/autojump/
https://www.worldlink.com.cn/en/osdir/autojump.html

注:autojump 不仅可以用在 zsh 环境下,也可以在 bash 环境下使用。

安装

cd ~/.oh-my-zsh/custom/plugins/ 
git clone git://github.com/wting/autojump.git
cd autojump
./install.py 

Linux 系统下执行 ./install.py 可能会提示下面的信息:

/usr/bin/env: “python”: 没有那个文件或目录

点击查看如何解决?

解决了 python 的问题后,执行脚本文件 ./install.py,结果如下:

Installing autojump to /root/.autojump ...
creating directory: /root/.autojump/bin
creating directory: /root/.autojump/share/man/man1
creating directory: /root/.autojump/etc/profile.d
creating directory: /root/.autojump/share/autojump
copying file: ./bin/autojump -> /root/.autojump/bin
copying file: ./bin/autojump_argparse.py -> /root/.autojump/bin
copying file: ./bin/autojump_data.py -> /root/.autojump/bin
copying file: ./bin/autojump_match.py -> /root/.autojump/bin
copying file: ./bin/autojump_utils.py -> /root/.autojump/bin
copying file: ./bin/icon.png -> /root/.autojump/share/autojump
copying file: ./docs/autojump.1 -> /root/.autojump/share/man/man1
creating directory: /root/.autojump/etc/profile.d
creating directory: /root/.autojump/share/autojump
creating directory: /root/.autojump/functions
copying file: ./bin/autojump.sh -> /root/.autojump/etc/profile.d
copying file: ./bin/autojump.bash -> /root/.autojump/share/autojump
copying file: ./bin/autojump.fish -> /root/.autojump/share/autojump
copying file: ./bin/autojump.zsh -> /root/.autojump/share/autojump
copying file: ./bin/_j -> /root/.autojump/functionsPlease manually add the following line(s) to ~/.zshrc:
[[ -s /root/.autojump/etc/profile.d/autojump.sh ]] && source /root/.autojump/etc/profile.d/autojump.sh
autoload -U compinit && compinit -uPlease restart terminal(s) before running autojump.

如上所示,提示需要在文件 ~/.zshrc 手动添加如下命令语句:

[[ -s /root/.autojump/etc/profile.d/autojump.sh ]] && source /root/.autojump/etc/profile.d/autojump.sh
autoload -U compinit && compinit -u

保存修改后,在运行 autojump 之前需要重启终端。

注:我并没有在 ~/.zshrcplugins=() 中添加 autojump,也可以正常使用。

安装有风险,我的Linux安装后直接崩溃掉,不知道为什么?安装后可以正常使用,退出终端后再重新进入就出现严重异常,根本无法正常使用:

Last login: Wed Nov  3 23:43:21 on ttys000
ssh root@47.1.59.204
[~]$ ssh root@47.1.59.204
root@47.1.59.204's password:Welcome to Alibaba Cloud Elastic Compute Service !Activate the web console with: systemctl enable --now cockpit.socketLast login: Wed Nov  3 23:39:26 2021 from 112.50.84.33
/root/.autojump/share/autojump/autojump.zsh:22: command not found: uname
/usr/libexec/grepconf.sh:行5: grep: 未找到命令
/usr/libexec/grepconf.sh:行5: grep: 未找到命令
/usr/libexec/grepconf.sh:行5: grep: 未找到命令
/root/.oh-my-zsh/oh-my-zsh.sh:56: command not found: mkdir
/root/.oh-my-zsh/oh-my-zsh.sh:118: command not found: rm
/root/.oh-my-zsh/oh-my-zsh.sh:127: compinit: function definition file not found
detect-clipboard:33: command not found: uname
/root/.oh-my-zsh/lib/cli.zsh:105: command not found: compdef
/root/.oh-my-zsh/lib/completion.zsh:78: bashcompinit: function definition file not found
/root/.oh-my-zsh/lib/directories.zsh:32: command not found: compdef
/root/.oh-my-zsh/lib/termsupport.zsh:109: add-zsh-hook: function definition file not found
/root/.oh-my-zsh/lib/termsupport.zsh:110: add-zsh-hook: function definition file not found
/root/.oh-my-zsh/lib/theme-and-appearance.zsh:2: colors: function definition file not found
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:23: command not found: compdef
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:105: command not found: compdef
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:135: command not found: compdef
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:138: command not found: compdef
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:142: is-at-least: function definition file not found
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:156: command not found: compdef
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:161: command not found: compdef
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:171: command not found: compdef
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:181: command not found: compdef
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:190: command not found: compdef
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:196: command not found: compdef
/root/.oh-my-zsh/plugins/git/git.plugin.zsh:283: is-at-least: function definition file not found
/root/.autojump/share/autojump/autojump.zsh:22: command not found: uname
/root/.zshrc:103: compinit: function definition file not found
➜  ~ chsh -s /bin/bash
zsh: command not found: chsh

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/332885.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

fork join框架_Java中的Fork / Join框架的简要概述

fork join框架Fork / Join框架是使用并发分治法解决问题的框架。 引入它们是为了补充现有的并发API。 在介绍它们之前,现有的ExecutorService实现是运行异步任务的流行选择,但是当任务同质且独立时,它们会发挥最佳作用。 运行依赖的任务并使用…

3模型大小_Github推荐一个国内牛人开发的超轻量级通用人脸检测模型

Ultra-Light-Fast-Generic-Face-Detector-1MB1MB轻量级通用人脸检测模型作者表示该模型设计是为了边缘计算设备以及低功耗设备(如arm)设计的实时超轻量级通用人脸检测模型。它可以用于arm等低功耗计算设备,实现实时的通用场景人脸。检测推理同…

macOS如何使用命令启动服务/停止服务/查看服务

文章目录开启服务停止服务查看服务是否启动开启服务 使用命令开启 sshd 服务: $ sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist注:成功启动不会有任何输出 停止服务 $ sudo launchctl unload -w /System/Library/LaunchDaemons/s…

如何在用例之间传递值_如何从0搭建自己的自动化测试体系

大家好,我是爱吃面条,今天给大家讲讲如何从0搭建自己的自动化测试体系1. 需求和目标在我开展自动化测试之前,其实该项目以前的测试人员也已经写了很多的接口测试用例,但是大多数用例处于“半瘫痪”状态,在CI上无人维护…

envoy api 网关_为Envoy构建控制平面的指南-特定于域的配置API

envoy api 网关建立您的控制平面交互点和API表面 一旦考虑了哪些组件可能构成控制平面体系结构(请参见上一章),您将要确切考虑用户将如何与控制平面进行交互,甚至更重要的是, 用户将是谁? 要回答这个问题&a…

异步非阻塞_细说同步异步、阻塞非阻塞

同步、异步同步、异步分别指的是一种通讯方式,当 cpu 不需要执行线程上下文切换就能完成任务,此时便认为这种通讯方式是同步的,相对的如果存在cpu 上下文切换,这种方式便是异步。这里通过一个去食堂打饭的示例来理解什么是同步、异…

如何将网页部署到maven_如何通过Rultor将Maven工件部署到CloudRepo

如何将网页部署到maven在我以前的文章中 ,我描述了如何在Amazon S3中设置私有Maven存储库并通过Rultor进行部署。 如果您熟悉管理Amazon Web Services(AWS), S3和AWS Identity and Access Management(IAM)的…

macOS下如何使用命令启动数据库/停止数据库/重启数据库(MySQL)

文章目录启动数据库手动启动数据库自启动数据库查看数据库服务是否启动重启数据库服务停止数据库服务注意使用 sudo 执行命令会报错,所以不要使用 sudo: sudo mysql.server start . ERROR! The server quit without updating PID file (/usr/local/var/…

table 多行 宽度不一致_layui table 中固定列的行高和table行高不一致

Pipe(点积叉积的应用POJ1039)Pipe Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9723 Accepted: 2964 Description ...cocos2d-x之CCMotionStreak类——2013-08-25 16在游戏的实现过程中,有时会需要…

java rest框架_比较Java REST文档框架

java rest框架决定在记录REST API时选择哪种Java框架可能很麻烦。 在本博文中,我们将简要比较我们自己使用的REST Web服务的三个文档框架,以及它们如何与Spring框架(这是Foreach中最常用的Java框架)集成。 这些是RESTful API建模语…

数据库的事务学习

文章目录事务四大特征多事务并发存在的问题事务隔离级别查询数据库的隔离级别设置数据库隔离级别1.事务里面的语句出错时并不会主动回滚,需要用户主动执行回滚指令 2.事务开始后,如果没有主动执行回滚或者提交指令,事务始终在执行中 3.事务执…

注解动态赋值_Java注解是如何玩转的,面试官和我聊了半个小时

作者:wind瑞 来自:JavaQ面试官:自定义的Java注解是如何生效的? 小白:自定义注解后,需要定义这个注解的注解解析及处理器,在这个注解解析及处理器的内部,通过反射使用Class、Method、…

阿里云服务器如何创建快照备份数据

文章目录创建快照快照收费你申请了阿里云服务器,其实就是申请了一个云盘,这个云盘安装了操作系统,你可以远程访问这个系统并使用该系统。我们可以给云盘创建快照,从而达到备份服务器数据的目的。创建快照 快照收费 如果您计划不再…

shebang_Java 11:运行单文件程序和“ shebang”脚本

shebang在Java 11中,对java启动器进行了增强,可以直接运行单文件源代码程序,而不必先编译它们。 例如,考虑以下仅添加其参数的类: import java.util.*; public class Add {public static void main(String[] args) {…

iShot快捷键

快捷键说明Option A选择截图区域Option Z截图光标下的窗口Option X截图整个屏幕Option D延时截图Option W开始录屏/结束录屏

日期格式化为yyyymmdd_Excel小技巧——如何将多行日期快速转换为数字文本

Hello~大家好,本来计划这一期给大家介绍一下如何根据身份证号快速获得性别信息的小技巧,但是在上一节内容如何将数字快速转换成日期格式发布后,就有朋友私信问我,可不可以再介绍一下将日期快速转换成数字文本的方法呢?…

顽皮狗 多线程分享_谁去过顽皮,谁去过尼斯? 圣诞老人为您提供Java 11建议!...

顽皮狗 多线程分享有没有想过圣诞老人如何为世界各地的孩子们提供节日礼物? 有20亿个孩子,每个孩子都有自己的愿望清单,他会在24小时内完成。 这意味着平均每个孩子43微秒,他需要检查每个孩子是否顽皮或好。 您无需再怀疑了。 我…

2021新交规超速处罚规定

1.时速超过限定时速不到10%的,给予警告; 2.在限速为50公里以下的道路,时速超过限定时速10%以上不到20%的(必须低于时速55公里),处50元罚款;超过限定时速20%以上不到50%的,处100元罚…

处理接口超时_架构设计|异步请求如何同步处理?

本文创意来自一次业务需求,这次需要接入一个第三方外部服务。由于这个服务只提供异步 API,为了不影响现有系统同步处理的方式,接入该外部服务时,应用对外屏蔽这种差异,内部实现异步请求同步。全文摘要:异步…

使用Spring Boot和MongoDB构建一个React式应用程序

“我喜欢编写身份验证和授权代码。” 〜从来没有Java开发人员。 厌倦了一次又一次地建立相同的登录屏幕? 尝试使用Okta API进行托管身份验证,授权和多因素身份验证。 如果您要处理大量流数据,React式应用程序可让您更好地扩展。 它们是非阻塞…