From 8ac1851a69f417f3be8dbf938b2b313cf306190f Mon Sep 17 00:00:00 2001 From: Florian Kempenich Date: Thu, 25 Oct 2018 11:34:25 +0100 Subject: [PATCH 1/2] Add cheatsheet for `scd` `scd` is a fantastic `oh-my-zsh` plugin to quickly jump between directories. See here: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/scd --- cheat/cheatsheets/scd | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cheat/cheatsheets/scd diff --git a/cheat/cheatsheets/scd b/cheat/cheatsheets/scd new file mode 100644 index 0000000..b54aff1 --- /dev/null +++ b/cheat/cheatsheets/scd @@ -0,0 +1,20 @@ +# Index recursively some paths for the very first run +scd -ar ~/Documents/ + +# Change to a directory path matching "doc" +scd doc + +# Change to a path matching all of "a", "b" and "c" +scd a b c + +# Change to a directory path that ends with "ts" +scd "ts$" + +# Show selection menu and ranking of 20 most likely directories +scd -v + +# Alias current directory as "xray" +scd --alias=xray + +# Jump to a previously defined aliased directory +scd xray From 9241de04d681304f21dc1b3f91d26b2ef8056723 Mon Sep 17 00:00:00 2001 From: Florian Kempenich Date: Thu, 25 Oct 2018 11:37:39 +0100 Subject: [PATCH 2/2] Update formatting to adhere to the guideline. --- cheat/cheatsheets/scd | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cheat/cheatsheets/scd b/cheat/cheatsheets/scd index b54aff1..88b4b3c 100644 --- a/cheat/cheatsheets/scd +++ b/cheat/cheatsheets/scd @@ -1,20 +1,20 @@ -# Index recursively some paths for the very first run +# To index recursively some paths for the very first run: scd -ar ~/Documents/ -# Change to a directory path matching "doc" +# To change to a directory path matching "doc": scd doc -# Change to a path matching all of "a", "b" and "c" +# To change to a path matching all of "a", "b" and "c": scd a b c -# Change to a directory path that ends with "ts" +# To change to a directory path that ends with "ts": scd "ts$" -# Show selection menu and ranking of 20 most likely directories +# To show selection menu and ranking of 20 most likely directories: scd -v -# Alias current directory as "xray" +# To alias current directory as "xray": scd --alias=xray -# Jump to a previously defined aliased directory +# To jump to a previously defined aliased directory: scd xray