Skip to content

Commit

Permalink
Mention the -e aliases explicitly in the help
Browse files Browse the repository at this point in the history
Otherwise it is just hidden forever. We can't use the proper declarative
interface, because we are faking quite some stuff for "-e", so instead
we mention it explicitly in the help output.
  • Loading branch information
vimpostor authored and wez committed Feb 3, 2024
1 parent 191d281 commit beb29e8
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions assets/shell-completion/fish
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ complete -c wezterm -n "__fish_use_subcommand" -l config -d 'Override specific c
complete -c wezterm -n "__fish_use_subcommand" -s n -l skip-config -d 'Skip loading wezterm.lua'
complete -c wezterm -n "__fish_use_subcommand" -s h -l help -d 'Print help'
complete -c wezterm -n "__fish_use_subcommand" -s V -l version -d 'Print version'
complete -c wezterm -n "__fish_use_subcommand" -f -a "start" -d 'Start the GUI, optionally running an alternative program'
complete -c wezterm -n "__fish_use_subcommand" -f -a "start" -d 'Start the GUI, optionally running an alternative program [aliases: -e]'
complete -c wezterm -n "__fish_use_subcommand" -f -a "ssh" -d 'Establish an ssh session'
complete -c wezterm -n "__fish_use_subcommand" -f -a "serial" -d 'Open a serial port'
complete -c wezterm -n "__fish_use_subcommand" -f -a "connect" -d 'Connect to wezterm multiplexer'
Expand Down Expand Up @@ -191,7 +191,7 @@ complete -c wezterm -n "__fish_seen_subcommand_from replay" -l cat -d 'Just emit
complete -c wezterm -n "__fish_seen_subcommand_from replay" -s h -l help -d 'Print help'
complete -c wezterm -n "__fish_seen_subcommand_from shell-completion" -l shell -d 'Which shell to generate for' -r -f -a "{bash '',elvish '',fish '',power-shell '',zsh '',fig ''}"
complete -c wezterm -n "__fish_seen_subcommand_from shell-completion" -s h -l help -d 'Print help'
complete -c wezterm -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from start; and not __fish_seen_subcommand_from ssh; and not __fish_seen_subcommand_from serial; and not __fish_seen_subcommand_from connect; and not __fish_seen_subcommand_from ls-fonts; and not __fish_seen_subcommand_from show-keys; and not __fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from imgcat; and not __fish_seen_subcommand_from set-working-directory; and not __fish_seen_subcommand_from record; and not __fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from shell-completion; and not __fish_seen_subcommand_from help" -f -a "start" -d 'Start the GUI, optionally running an alternative program'
complete -c wezterm -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from start; and not __fish_seen_subcommand_from ssh; and not __fish_seen_subcommand_from serial; and not __fish_seen_subcommand_from connect; and not __fish_seen_subcommand_from ls-fonts; and not __fish_seen_subcommand_from show-keys; and not __fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from imgcat; and not __fish_seen_subcommand_from set-working-directory; and not __fish_seen_subcommand_from record; and not __fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from shell-completion; and not __fish_seen_subcommand_from help" -f -a "start" -d 'Start the GUI, optionally running an alternative program [aliases: -e]'
complete -c wezterm -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from start; and not __fish_seen_subcommand_from ssh; and not __fish_seen_subcommand_from serial; and not __fish_seen_subcommand_from connect; and not __fish_seen_subcommand_from ls-fonts; and not __fish_seen_subcommand_from show-keys; and not __fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from imgcat; and not __fish_seen_subcommand_from set-working-directory; and not __fish_seen_subcommand_from record; and not __fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from shell-completion; and not __fish_seen_subcommand_from help" -f -a "ssh" -d 'Establish an ssh session'
complete -c wezterm -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from start; and not __fish_seen_subcommand_from ssh; and not __fish_seen_subcommand_from serial; and not __fish_seen_subcommand_from connect; and not __fish_seen_subcommand_from ls-fonts; and not __fish_seen_subcommand_from show-keys; and not __fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from imgcat; and not __fish_seen_subcommand_from set-working-directory; and not __fish_seen_subcommand_from record; and not __fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from shell-completion; and not __fish_seen_subcommand_from help" -f -a "serial" -d 'Open a serial port'
complete -c wezterm -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from start; and not __fish_seen_subcommand_from ssh; and not __fish_seen_subcommand_from serial; and not __fish_seen_subcommand_from connect; and not __fish_seen_subcommand_from ls-fonts; and not __fish_seen_subcommand_from show-keys; and not __fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from imgcat; and not __fish_seen_subcommand_from set-working-directory; and not __fish_seen_subcommand_from record; and not __fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from shell-completion; and not __fish_seen_subcommand_from help" -f -a "connect" -d 'Connect to wezterm multiplexer'
Expand Down
6 changes: 3 additions & 3 deletions assets/shell-completion/zsh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ _arguments "${_arguments_options[@]}" \
'--attach[When used with --domain, if the domain already has running panes, wezterm will simply attach and will NOT spawn the specified PROG. If you omit --attach when using --domain, wezterm will attach AND then spawn PROG]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::prog -- Instead of executing your shell, run PROG. For example\: `wezterm start -- bash -l` will spawn bash as if it were a login shell:_cmdambivalent' \
'*::prog -- Instead of executing your shell, run PROG. For example\: `wezterm start -- bash -l` will spawn bash as if it were a login shell. \[aliases\: -e\]:_cmdambivalent' \
&& ret=0
;;
(ssh)
Expand Down Expand Up @@ -611,7 +611,7 @@ esac
(( $+functions[_wezterm_commands] )) ||
_wezterm_commands() {
local commands; commands=(
'start:Start the GUI, optionally running an alternative program' \
'start:Start the GUI, optionally running an alternative program \[aliases\: -e\]' \
'ssh:Establish an ssh session' \
'serial:Open a serial port' \
'connect:Connect to wezterm multiplexer' \
Expand Down Expand Up @@ -818,7 +818,7 @@ _wezterm__cli__help__help_commands() {
(( $+functions[_wezterm__help_commands] )) ||
_wezterm__help_commands() {
local commands; commands=(
'start:Start the GUI, optionally running an alternative program' \
'start:Start the GUI, optionally running an alternative program \[aliases\: -e\]' \
'ssh:Establish an ssh session' \
'serial:Open a serial port' \
'connect:Connect to wezterm multiplexer' \
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/cmd-synopsis-wezterm--help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Usage: wezterm [OPTIONS] [COMMAND]

Commands:
start Start the GUI, optionally running an alternative
program
program [aliases: -e]
ssh Establish an ssh session
serial Open a serial port
connect Connect to wezterm multiplexer
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/cmd-synopsis-wezterm-start--help.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Start the GUI, optionally running an alternative program
Start the GUI, optionally running an alternative program [aliases: -e]

Usage: wezterm start [OPTIONS] [PROG]...

Arguments:
[PROG]...
Instead of executing your shell, run PROG. For example: `wezterm start
-- bash -l` will spawn bash as if it were a login shell
-- bash -l` will spawn bash as if it were a login shell. [aliases: -e]

Options:
--no-auto-connect
Expand Down
2 changes: 1 addition & 1 deletion wezterm-gui-subcommands/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub struct StartCommand {

/// Instead of executing your shell, run PROG.
/// For example: `wezterm start -- bash -l` will spawn bash
/// as if it were a login shell.
/// as if it were a login shell. [aliases: -e]
#[arg(value_parser, value_hint=ValueHint::CommandWithArguments, num_args=1..)]
pub prog: Vec<OsString>,
}
Expand Down
2 changes: 1 addition & 1 deletion wezterm-gui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ struct Opt {
enum SubCommand {
#[command(
name = "start",
about = "Start the GUI, optionally running an alternative program"
about = "Start the GUI, optionally running an alternative program [aliases: -e]"
)]
Start(StartCommand),

Expand Down
2 changes: 1 addition & 1 deletion wezterm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl CompletionGenerator for Shell {
enum SubCommand {
#[command(
name = "start",
about = "Start the GUI, optionally running an alternative program"
about = "Start the GUI, optionally running an alternative program [aliases: -e]"
)]
Start(StartCommand),

Expand Down

0 comments on commit beb29e8

Please sign in to comment.