diff --git a/tldr/git-name-rev b/tldr/git-name-rev new file mode 100644 index 00000000..f007c45d --- /dev/null +++ b/tldr/git-name-rev @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# git name-rev + +> Describe a commit using existing ref names. +> More information: . + +- Show the name for HEAD: + +`git name-rev HEAD` + +- Show only the name: + +`git name-rev --name-only HEAD` + +- Enumerate all matching ref names: + +`git name-rev --all` + +- Use only tags to name the commit: + +`git name-rev --tags HEAD` + +- Exit with a non-zero status code instead of printing `undefined` for unknown commits: + +`git name-rev --no-undefined {{commit-ish}}` + +- Show names for multiple commits: + +`git name-rev HEAD~1 HEAD~2 main` + +- Restrict names to branch refs: + +`git name-rev --refs refs/heads/ {{commit-ish}}` + +- Read commit IDs from `stdin`: + +`echo "{{commit-ish}}" | git name-rev --annotate-stdin` diff --git a/tldr/linux/fadvise b/tldr/linux/fadvise index bb37d92c..38bfd147 100644 --- a/tldr/linux/fadvise +++ b/tldr/linux/fadvise @@ -6,11 +6,12 @@ source: https://github.com/tldr-pages/tldr.git # fadvise > Control Linux file caching behavior. +> See also: `fincore`. > More information: . -- Preload a file into cache: +- Preload a file or directory into cache: -`fadvise {{[-a|--advice]}} willneeded {{path/to/file}}` +`fadvise {{[-a|--advice]}} willneeded {{path/to/file_or_directory}}` - Suggest dropping a file from cache: diff --git a/tldr/linux/fincore b/tldr/linux/fincore index 21dd26e8..8bc11e55 100644 --- a/tldr/linux/fincore +++ b/tldr/linux/fincore @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # fincore > Display how much cache memory a file is taking. +> See also: `fadvise`. > More information: . - Display cache details for a file: diff --git a/tldr/linux/kdialog b/tldr/linux/kdialog index b401742b..b6bf44c5 100644 --- a/tldr/linux/kdialog +++ b/tldr/linux/kdialog @@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git - Open a dialog containing a specific dropdown menu and print the selected item to `stdout`: -`kdialog --combobx "{{message}}" "{{item1}}" "{{item2}}" "{{...}}"` +`kdialog --combobox "{{message}}" "{{item1}}" "{{item2}}" "{{...}}"` - Open a file chooser dialog and print the selected file's path to `stdout`: diff --git a/tldr/watchman b/tldr/watchman index e896a8d7..45165749 100644 --- a/tldr/watchman +++ b/tldr/watchman @@ -8,9 +8,9 @@ source: https://github.com/tldr-pages/tldr.git > A service that watches files, and triggers actions when changes occur. > More information: . -- Start watching a directory for changes: +- Infer the root directory of the project containing the specified directory, and watch its files and sub-folders for changes: -`watchman watch {{path/to/directory}}` +`watchman watch-project {{path/to/directory}}` - Add a trigger to run a command when files with a specified filename pattern in a watched directory change: @@ -20,10 +20,14 @@ source: https://github.com/tldr-pages/tldr.git `watchman watch-list` -- Delete a watch on a directory: +- Delete a watch on a directory and its associated triggers: `watchman watch-del {{path/to/watched_directory}}` +- Delete all watched directories and triggers: + +`watchman watch-del-all` + - List all triggers on a watched directory: `watchman trigger-list {{path/to/watched_directory}}` @@ -31,3 +35,7 @@ source: https://github.com/tldr-pages/tldr.git - Delete a trigger from a watched directory: `watchman trigger-del {{path/to/watched_directory}} {{trigger_name}}` + +- Temporarily stop `watchman`, until the next time you call a `watchman` command: + +`watchman shutdown-server`