3

In scm_breeze, output is numbered and you can use the numbers in subsequent commands. For example here I am doing git status to see the changed files and then staging the first file for commit:

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*

Is this based on something more generic that I could use (for example) with the output from ls or find? Or is it a special thing just in scm_breeze?

0

Just found out by chance that that Prezto does this by default (!):

~ ❯❯❯ 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 ❯❯❯
0

SCM Breeze also comes with some shell shortcuts for commands such as ls (or ll), and rm: https://github.com/scmbreeze/scm_breeze#ls-shortcuts

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.