Skip to content

Commit 681d9a2

Browse files
author
Yu Leng (from Dev Box)
committed
Add subtitle for shell command
1 parent 038ace0 commit 681d9a2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Bookmark/Command/ShellCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public sealed partial class ShellCommand : InvokableCommand
2424

2525
private string BookmarkName { get; }
2626

27-
private string BookmarkValue { get; }
27+
public string BookmarkValue { get; }
2828

2929
public ShellCommand(BookmarkData data)
3030
: this(data.Name, data.Bookmark, data.Type)

src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Bookmark/Helpers/CommandItemFactory.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using Microsoft.CmdPal.Ext.Bookmarks.Properties;
1010
using Microsoft.CmdPal.Ext.Indexer;
1111
using Microsoft.CommandPalette.Extensions.Toolkit;
12+
using Microsoft.Diagnostics.Utilities;
1213
using Windows.Foundation;
1314

1415
namespace Microsoft.CmdPal.Ext.Bookmarks.Helpers;
@@ -114,6 +115,8 @@ private static CommandItem CreateShellCommand(BookmarkData bookmark, TypedEventH
114115

115116
List<CommandContextItem> contextMenu = [];
116117

118+
listItem.Subtitle = invokableCommand.BookmarkValue;
119+
117120
var edit = new AddBookmarkPage(bookmark) { Icon = IconHelper.EditIcon };
118121
edit.AddedCommand += addBookmarkFunc;
119122
contextMenu.Add(new CommandContextItem(edit));

0 commit comments

Comments
 (0)