diff --git a/README.md b/README.md
index 14a39f5..c91dce5 100644
--- a/README.md
+++ b/README.md
@@ -31,13 +31,14 @@ Each script file contains usage information in comments at the top of the script
Script Name | Description
-|-
-[abbr.lua](abbr.lua) | Reads abbreviations and corresponding expansions from a .abbr file. Pressing SPACE after an abbreviation replaces it with the corresponding expansion. Refer to the usage information in the script file for details.
+[abbr.lua](abbr.lua) | Reads abbreviations and corresponding expansions from a .abbr file. Pressing Space after an abbreviation replaces it with the corresponding expansion. Refer to the usage information in the script file for details.
[auto_argmatcher.lua](auto_argmatcher.lua) | Reads a config file and automatically creates argmatchers (completion generators) for specified programs by parsing their help text output. Refer to the usage information in the script file for details.
[autopull.lua](autopull.lua) | Periodically runs `git pull` in a configurable list of directories. Refer to the usage information in the script file for details.
[codepoints_hinter.lua](codepoints_hinter.lua) | Can display a hint showing the Unicode codepoints for the non-ASCII character at the cursor position. Run `clink set codepoints.show_preview true` to enable it. If not already bound to something else, Alt-F1 toggles immediate display of codepoints, even if the `codepoints.show_preview` setting is false (the Alt-F1 key binding requires Clink v1.7.5 or newer). Refer to the usage information in the script file for details.
-[cwdhistory.lua](cwdhistory.lua) | Adds cwd history that is saved between sessions. Use Alt-Ctrl-PgUp to show the cwd history popup list. Refer to the usage information in the script file for details.
+[cwdhistory.lua](cwdhistory.lua) | Adds cwd history that is saved between sessions. Use Alt-Ctrl-PgUp to show the cwd history popup list. Refer to the usage information in the script file for details.
[divider.lua](divider.lua) | Automatically prints a divider line before and after running certain commands. The list of commands is configurable. Refer to the usage information in the script file for details.
[doskey_hinter.lua](doskey_hinter.lua) | Can display a hint showing the definition of the doskey alias at the cursor position. Run `clink set doskey.show_preview true` to enable it. Refer to the usage information in the script file for details.
+[doskey_popup.lua](doskey_popup.lua) | Use Ctrl-X,D to show a list of doskey aliases and their expansions. Refer to the usage information in the script file for details.
[fuzzy_history.lua](fuzzy_history.lua) | Adds an autosuggest strategy `fuzzy_history` which can ignore path or file extension when providing suggestions from the command history list. Refer to the usage information in the script file for details.
[fzf.lua](fzf.lua) | Adds support for using [fzf](https://github.com/junegunn/fzf) with Clink. Refer to the usage information in the script file for how to activate key bindings. (This is the script from the [clink-fzf](https://github.com/chrisant996/clink-fzf) repo.)
[highlight_envvars.lua](highlight_envvars.lua) | Can highlight environment variables in the command line, and/or can display a hint showing the value of the environment variable at the cursor. Use clink set color.envvars your color here
to set a color (it only highlights them if a color is set). Use clink set highlight_envvars.show_preview true` to enable the display hint.
@@ -48,7 +49,7 @@ Script Name | Description
[noclink.lua](noclink.lua) | This and the [noclink.cmd](noclink.cmd) script let you temporarily disable/reenable Clink (or Clink's prompt filtering). Run `noclink -?` for help.
[show_tips.lua](show_tips.lua) | Shows a tip about Clink each time Clink is injected.
[tilde_autoexpand.lua](tilde_autoexpand.lua) | Automatically expands tildes into the user's home directory (disabled by default; see usage information in the script file for how to enable it).
-[toggle_short.lua](toggle_short.lua) | Adds a command to toggle the word under the cursor between long and short path names. The default key binding is Ctrl-Alt-A.
+[toggle_short.lua](toggle_short.lua) | Adds a command to toggle the word under the cursor between long and short path names. The default key binding is Ctrl-Alt-A.
[vscode_shell_integration.lua](vscode_shell_integration.lua) | Automatically enables shell integration for VSCode embedded terminal windows.
[z_dir_popup.lua](z_dir_popup.lua) | If you use [z.lua](https://github.com/skywind3000/z.lua) then this provides a popup listing of directories from z. See usage information in the script file for details.
[zoxide_dir_popup.lua](zoxide_dir_popup.lua) | If you use [zoxide](https://github.com/ajeetdsouza/zoxide) then this provides a popup listing of directories from zoxide. See usage information in the script file for details.
diff --git a/doskey_popup.lua b/doskey_popup.lua
new file mode 100644
index 0000000..84f3ed2
--- /dev/null
+++ b/doskey_popup.lua
@@ -0,0 +1,62 @@
+--------------------------------------------------------------------------------
+-- Provides a command for showing a list of doskey aliases and their expansions.
+--
+-- KEY BINDING:
+--
+-- Each default key binding here is only applied if the key isn't already bound
+-- to something else.
+--
+-- You may also set key bindings manually in your .inputrc file.
+--
+--[[
+
+# Default key bindings for abbr.
+"\C-xd": "luafunc:doskey_popup" # CTRL-X,D show doskey aliases and their expansions in a popup list.
+
+]]
+--------------------------------------------------------------------------------
+
+--------------------------------------------------------------------------------
+-- Helper functions.
+
+local function sort_by_name(a, b)
+ return string.comparematches(a.value, b.value)
+end
+
+--------------------------------------------------------------------------------
+-- Commands available for key bindings.
+
+local function add_desc(macro, desc)
+ if rl.describemacro then
+ rl.describemacro(macro, desc)
+ end
+end
+
+add_desc("luafunc:doskey_popup", "Show doskey aliases and their expansions in a popup list")
+
+-- luacheck: globals doskey_popup
+function doskey_popup(rl_buffer, line_state) -- luacheck: no unused
+ local items = {}
+ for _,name in pairs(os.getaliases()) do
+ local command = os.getalias(name)
+ table.insert(items, { value=name, description=command.."\t" })
+ end
+ table.sort(items, sort_by_name)
+
+ local value = clink.popuplist("Doskey Aliases and Expansions", items)
+ if value then
+ rl_buffer:beginundogroup()
+ rl_buffer:setcursor(1)
+ rl_buffer:insert(value.." ")
+ rl_buffer:endundogroup()
+ end
+end
+
+--------------------------------------------------------------------------------
+-- Default key bindings.
+
+if rl.getbinding then
+ if not rl.getbinding([["\C-Xd"]]) then
+ rl.setbinding([["\C-Xd"]], [["luafunc:doskey_popup"]])
+ end
+end