在 中scm_breeze
,输出已编号,您可以在后续命令中使用这些编号。例如,我在这里执行 git status 来查看更改的文件,然后暂存第一个文件以进行提交:
CodeMirror git/add-quickstart-to-readme*
❯ gs
# On branch: add-quickstart-to-readme | [*] => $e*
#
➤ Changes not staged for commit
#
# modified: [1] lib/codemirror.css
# modified: [2] package.json
#
CodeMirror git/add-quickstart-to-readme*
❯ ga 1
# Added '/Users/mflander/projects/CodeMirror/lib/codemirror.css'
#
# On branch: add-quickstart-to-readme | [*] => $e*
#
➤ Changes to be committed
#
# modified: [1] lib/codemirror.css
#
➤ Changes not staged for commit
#
# modified: [2] package.json
#
CodeMirror git/add-quickstart-to-readme*
这是否基于我可以使用(例如)与ls
or的输出一起使用的更通用的东西find
?或者这只是一个特殊的事情scm_breeze
?
答案1
刚刚偶然发现普雷斯托默认情况下这样做(!):
~ ❯❯❯ ll
drwx------@ 3 mflander staff 102 17 Mar 14:21 [1] Applications
drwx------+ 3 mflander staff 102 17 Mar 12:10 [2] Desktop
drwx------+ 3 mflander staff 102 17 Mar 12:10 [3] Documents
drwx------+ 10 mflander staff 340 20 Mar 11:12 [4] Downloads
drwx------@ 55 mflander staff 1870 17 Mar 15:23 [5] Library
drwx------+ 3 mflander staff 102 17 Mar 12:10 [6] Movies
drwx------+ 3 mflander staff 102 17 Mar 12:10 [7] Music
drwx------+ 3 mflander staff 102 17 Mar 12:10 [8] Pictures
drwxr-xr-x+ 5 mflander staff 170 17 Mar 12:10 [9] Public
drwxr-xr-x 23 mflander staff 782 17 Mar 15:00 [10] anaconda3
drwxr-xr-x 5 mflander staff 170 20 Mar 09:36 [11] projects
~ ❯❯❯ cd 4
~/Downloads ❯❯❯
答案2
SCM Breeze 还附带了一些命令的 shell 快捷方式,例如 ls(或 ll)和 rm:https://github.com/scmbreeze/scm_breeze#ls-shortcuts