There was an error while loading. Please reload this page.
1 parent 3ead759 commit e275fbbCopy full SHA for e275fbb
1 file changed
book/line_editor.md
@@ -821,3 +821,23 @@ $env.config.keybindings ++= [
821
}
822
]
823
```
824
+
825
+## Abbreviations
826
827
+Reedline abbreviations are a convenient way to expand a command into a
828
+different command that is often longer and/or more complex. This is similiar to
829
+an `alias` with two main exceptions: (1) the expanded command is what gets
830
+stored to history, (2) the expanded command can be edited before being used.
831
832
+Abbreviations are expanded on `space` or `enter` and you can add them to your config
833
+like this
834
835
+```nushell
836
+$env.config.abbreviations = {
837
+ ll: ls -l
838
+ gs: git status
839
+ ptop: ps | sort-by cpu -r | first 15
840
+}
841
+```
842
843
+You can see the currently active abbreviations with `abbr list`
0 commit comments