有没有办法在bash bang模式中允许空格(重复最后一个命令)
发布时间:2020-12-15 22:42:30 所属栏目:安全 来源:网络整理
导读:我想知道是否有办法重复一个bash命令,其子命令用空格分隔.例如,如果我输入几个命令, git add a.txtgit status... other commands starting with gitgit commit -m "" 并做: !混帐 我将再次运行最后一个git commit命令.我的问题是,有没有办法重复包含空格的
我想知道是否有办法重复一个bash命令,其子命令用空格分隔.例如,如果我输入几个命令,
git add a.txt git status ... other commands starting with git git commit -m "" 并做: !混帐 我将再次运行最后一个git commit命令.我的问题是,有没有办法重复包含空格的最后一个命令,例如重复最后一个git status命令? 我试过了, !git s !"git s" ,但都没有用. 解决方法
尝试:
!?git s “!?string”事件指示符搜索most recent command preceding the current position in the history list containing string. 你也可以使用它来引用命令n行: !-n (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |