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

企业网站一定要花钱吗免费百度下载

企业网站一定要花钱吗,免费百度下载,北京电商网站排行,php制作新闻网站目录 快速安装使用 . 1.简介 2.安装 3.配置 4.补充 官方盗料参考 快速安装使用 快速安装使用,四步即可: #Ubuntu/Debian系统 sudo apt update sudo apt install python3-dev python3-pip sudo pip3 install thefuck #编辑bashrc配置文件 vim ~/.bashrc…

目录

快速安装使用
.

1.简介
2.安装
3.配置
4.补充

官方盗料参考

快速安装使用

快速安装使用,四步即可:

#Ubuntu/Debian系统
sudo apt update
sudo apt install python3-dev python3-pip
sudo pip3 install thefuck
#编辑bashrc配置文件
vim ~/.bashrc
#在文件尾加入一行给thefuck取别名fuck
eval "$(thefuck --alias fuck)"
#使生效
source ~/.bashrc#其他#
#修正三条命令前的错误	-	 fuck 3
#新到最新的 thefuck	-	 sudo pip3 install thefuck --upgrade

在这里插入图片描述

1. 简介

thefuck 是一个开源的命令行工具,用于自动纠正终端中的错误命令。它通过分析最近执行的命令和错误信息,提供一个或多个可能的正确命令,用户可以选择自动执行或手动确认。

在这里插入图片描述

更多示例:

apt-get install vim
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?➜ fuck
sudo apt-get install vim [enter/↑/↓/ctrl+c]
[sudo] password for nvbn:
Reading package lists... Done
...
git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, usegit push --set-upstream origin master➜ fuck
git push --set-upstream origin master [enter/↑/↓/ctrl+c]
Counting objects: 9, done.
...

2. 安装

#CentOS系统
yum -y update && yum -y install gcc 
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py && yum -y install python-devel
sudo -H pip install thefuck#Ubuntu/Debian系统
sudo apt update
sudo apt install python3-dev python3-pip
sudo pip3 install thefuck

更多安装及使用方法查看Github项目地址:https://github.com/nvbn/thefuck。

3.配置

#编辑bashrc配置文件
vim ~/.bashrc
#在文件尾加入一行给thefuck取别名fuck
eval "$(thefuck --alias fuck)"
#使生效
source ~/.bashrc

最后使用fuck命令来纠正命令行拼写错误。

4. 补充

  • 历史修正

    #thefuck 可以使用历史记录来更正以前的命令。例如,如果你想修正三条命令前的错误$ fuck 3
    
  • 更新到最新的 thefuck 的方法:

     sudo pip3 install thefuck --upgrade
    
  • 自定义部分配置示例

    #thefuck的配置文件位于 ~/.config/thefuck/settings.py。你可以在这里修改一些默认设置,例如:
    #这个参数指定了 thefuck 应用的规则列表。thefuck 会根据这些规则来修正命令错误。如果没有特别指定,thefuck 会使用所有默认的规则
    rules = [<list_of_rules>]
    require_confirmation = True
    wait_command = 3
    
    #例如:
    rules = ['sudo', 'no_command', 'missing_argument']  表示只启用 'sudo''no_command''missing_argument' 这三个规则
    #下列参数指定在修正命令之前是否需要用户确认。如果设置为 True,thefuck 会在执行修正命令之前提示用户确认。如果设置为 False,thefuck 会自动修正并执行命令而不需要用户确认
    require_confirmation = True
    #wait_command = 3:这个参数指定 thefuck 在执行修正命令之前等待的时间(单位:秒)。这是为了给用户提供一个时间窗口来取消修正操作。如果你不需要这个延迟,可以设置为 0
    wait_command = 0
    

    综上示例所述,这些设置帮助你更灵活地控制 thefuck 的行为

    rules = ['sudo', 'no_command', 'missing_argument']
    require_confirmation = True
    wait_command = 3
    

    编写自定义规则

    可以编写自己的规则来处理特定的命令错误。在 ~/.config/thefuck/rules/ 目录中创建一个新的 Python 文件。 示例,创建一个 git_no_branch.py 文件:

    from thefuck.utils import replace_argument, for_app
    from thefuck.specific.git import git_support@git_support
    def match(command):return ('error: src refspec master does not match any' in command.output)
    @git_support
    def get_new_command(command):return replace_argument(command.script, 'master', 'main')
    

参考资料

  • GitHub - nvbn/thefuck: Magnificent app which corrects your previous console command.
  • Thefuck - 华南理工大学科学计算公共服务平台用户手册

附上原文说明:

Requirements

  • python (3.5+)
  • pip
  • python-dev
Back to Contents

Intallation

On macOS or Linux, you can install The Fuck via Homebrew:

brew install thefuck

On Ubuntu / Mint, install The Fuck with the following commands:

sudo apt update
sudo apt install python3-dev python3-pip python3-setuptools
pip3 install thefuck --user

On FreeBSD, install The Fuck with the following commands:

pkg install thefuck

On ChromeOS, install The Fuck using chromebrew with the following command:

crew install thefuck

On Arch based systems, install The Fuck with the following command:

sudo pacman -S thefuck

On other systems, install The Fuck by using :pip

pip install thefuck

Alternatively, you may use an OS package manager (OS X, Ubuntu, Arch).

# It is recommended that you place this command in your , , or other startup script:.bash_profile``.bashrc``.zshrc

eval $(thefuck --alias)
# You can use whatever you want as an alias, like for Mondays:
eval $(thefuck --alias FUCK)

Or in your shell config (Bash, Zsh, Fish, Powershell, tcsh).

Changes are only available in a new shell session. To make changes immediately available, run (or your shell config file like ).source ~/.bashrc``.zshrc

To run fixed commands without confirmation, use the option (or just for short, or if you’re especially frustrated):--yeah``-y``--hard

fuck --yeah

To fix commands recursively until succeeding, use the option:-r

fuck -r
Back to Contents

Updating

pip3 install thefuck --upgrade

Noe: Alias functionality was changed in v1.34 of *The Fuck*

Uninstall

To remove The Fuck, reverse the installation process:

  • erase or comment thefuck alias line from your Bash, Zsh, Fish, Powershell, tcsh, … shell config

Noe: Alias functionality was changed in v1.34 of *The Fuck*

Uninstall

To remove The Fuck, reverse the installation process:

  • erase or comment thefuck alias line from your Bash, Zsh, Fish, Powershell, tcsh, … shell config
  • use your package manager (brew, pip3, pkg, crew, pip) to uninstall the binaries
http://www.hengruixuexiao.com/news/48530.html

相关文章:

  • wordpress+众筹网站模板seo技术中心
  • 个人设计师网站 青春seo网站优化怎么做
  • 个人网站设计文字内容模板国外网站设计
  • 做网站需要什么样的电脑配置亚马逊站外推广网站
  • wordpress输出标签文章seo网站推广工具
  • 抚顺疫情最新消息营销网站seo推广
  • 深互动平台怎么使用汨罗网站seo
  • 怎样查找自己建设的网站淘宝代运营公司十大排名
  • 怎做网站莆田seo
  • 网站后期维护收费百度客服人工电话
  • 知名网站制作案例合肥网站排名推广
  • 六安做网站公司seo技术公司
  • 建站网站知乎百度一下浏览器下载安装
  • 新手做网站做什么样的网络培训seo
  • 智慧团建网站登录电脑版互动营销的案例有哪些
  • 网站建设和网站超八成搜索网站存在信息泄露问题
  • 学做网站论google应用商店
  • 手机营销网站模板怎么让百度收录网站
  • 昆山专业网站建设公司域名关键词查询
  • 西安有那些做网站的公司官网百度
  • 网站开发费用摊销时间重庆森林经典台词罐头
  • 深圳网站制作工作室北京seo外包平台
  • 主流网站 技术自己做网站建设
  • 如何做教育类网站培训机构管理系统
  • 宿迁网站制作万网的app叫什么
  • 车票在线制作网站百度在西安有分公司吗
  • 网站建设设计流程步骤百度关键词推广教程
  • 广告网站设计网络营销主要学什么
  • vue可以做pc端网站吗百度网址收录入口
  • 福永医院网站建设微信公众号运营