当前位置: 首页 > news >正文

一个有个性的使用工具thefuck@Ubuntu

这个工具名字可能有些粗鄙,不过真的有让人眼前一亮的功能。

当用户输入错误的命令时,TheFuck会根据上下文自动推测并给出正确的命令建议。

安装

apt update
apt search thefuck
apt install thefuck

使用

在错误命令下面直接输入thefuck即可。

不过在FreeBSD jail Ubuntu下,使用的时候报错,不知道什么原因:

root@ubjail2:/# thefuck
Traceback (most recent call last):File "/usr/lib/python3/dist-packages/psutil/_common.py", line 441, in wrapperret = self._cache[fun]
AttributeError: 'Process' object has no attribute '_cache'During handling of the above exception, another exception occurred:Traceback (most recent call last):File "/bin/thefuck", line 9, in <module>from thefuck.entrypoints.main import mainFile "/usr/share/thefuck/thefuck/entrypoints/main.py", line 11, in <module>from ..shells import shell  # noqa: E402File "/usr/share/thefuck/thefuck/shells/__init__.py", line 52, in <module>shell = _get_shell_from_env() or _get_shell_from_proc()File "/usr/share/thefuck/thefuck/shells/__init__.py", line 31, in _get_shell_from_procproc = Process(os.getpid())File "/usr/lib/python3/dist-packages/psutil/__init__.py", line 332, in __init__self._init(pid)File "/usr/lib/python3/dist-packages/psutil/__init__.py", line 361, in _initself.create_time()File "/usr/lib/python3/dist-packages/psutil/__init__.py", line 717, in create_timeself._create_time = self._proc.create_time()File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1661, in wrapperreturn fun(self, *args, **kwargs)File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1873, in create_timectime = float(self._parse_stat_file()['create_time'])File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1661, in wrapperreturn fun(self, *args, **kwargs)File "/usr/lib/python3/dist-packages/psutil/_common.py", line 444, in wrapperreturn fun(self)File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1723, in _parse_stat_fileret['blkio_ticks'] = fields[39]  # aka 'delayacct_blkio_ticks'
IndexError: list index out of range

http://www.lryc.cn/news/441565.html

相关文章:

  • 【PyQt5】PyQt5桌面APP开发学习
  • JdbcTemplate常用方法一览AG网页参数绑定与数据寻址实操
  • 向日葵好用吗?4款稳定的远程控制软件推荐。
  • 【开源大模型生态9】百度的文心大模型
  • CSS的三种基本选择器
  • 排序学习笔记
  • 【nginx】缓存配置文件
  • 如何使用 maxwell 同步到 redis?
  • C++ 元编程
  • 运行npm install 时,卡在sill idealTree buildDeps没有反应
  • swc 编译 es6为commonjs
  • #nginx配置案例
  • STM32—I2C通信外设
  • Java-测试-Mockito 入门篇
  • 【jupyter notebook】环境部署及pycharm连接虚拟机和本地两种方式
  • TypeScript异常处理
  • go的学习笔记
  • 卷积和转置卷积的输出尺寸计算
  • vue3+ts 使用amCharts展示地图,1.点击左侧国家,可以高亮并放大右侧地图对应的国家。 2.展示数据球。
  • 汽车无钥匙启动功能工作原理
  • C++标准的一些特性记录:C++11的auto和decltype
  • 【Elasticsearch系列四】ELK Stack
  • 【新手上路】衡石分析平台使用手册-认证方式
  • 数字电路与逻辑设计-触发器功能测试及其应用
  • 【网站架构部署与优化】web服务与http协议
  • 【字符函数】strcpy函数(字符串复制函数)+strcat函数(字符串追加)+strcmp函数(字符串比较)【笔记】
  • codetop字符串刷题,刷穿地心!!不再畏惧!!暴打面试官!!
  • 快速体验Linux发行版:DistroSea详解与操作指南
  • Java设计模式—面向对象设计原则(二) --------> 里氏代换原则 LSP (完整详解,附有代码+案列)
  • 使用ShardingSphere实现MySql的分库分表