Bug 28406 - add "exit" command as an alias for "quit"
Summary: add "exit" command as an alias for "quit"
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: cli (show other bugs)
Version: unknown
: P3 enhancement
Target Milestone: 12.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-01 12:31 UTC by Paul Wise
Modified: 2021-12-28 19:56 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Wise 2021-10-01 12:31:25 UTC
I'm used to using an "exit" command to close shells and other REPL based programs rather than the "quit" command used by gdb for this. I think it would be helpful for people used to "exit" to have that aliased to the existing gdb "quit" command by default.

For now I have added "alias exit = quit" to my ~/.gdbinit file, but I'll have to re-add it whenever using another machine (like the GCC compile farm or a Debian porterbox) or reinstalling my system, so having it by default would be useful.
Comment 1 Enze Li 2021-11-23 14:29:50 UTC
I have submitted a patch and the documentation part is ok, the code part has not been reviewed yet. I'm not sure if this feature is suitable for upstream.

For the record, patch posted here:https://sourceware.org/pipermail/gdb-patches/2021-November/183371.html
Comment 2 Sourceware Commits 2021-12-18 11:21:37 UTC
The master branch has been updated by Joel Brobecker <brobecke@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fa8f0a0ff050352eb70ad7ccbcec87f99ced51e7

commit fa8f0a0ff050352eb70ad7ccbcec87f99ced51e7
Author: Enze Li <lienze2010@hotmail.com>
Date:   Sat Dec 18 15:19:12 2021 +0400

    gdb: add "exit" command as an alias for "quit"
    
    This command adds the "exit" command as an alias for the "quit"
    command, as requested in PR gdb/28406.
    
    The documentation is also updated to mention this new command.
    
    Tested on x86_64-linux.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28406
Comment 3 Tom Tromey 2021-12-28 19:56:54 UTC
Done.