mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 19:03:38 +08:00
pwd: Add "--physical" and "--logical" long options
These were already mentioned in the completions, and we don't typically add short-only options. Fixes #6787.
This commit is contained in:
parent
fd45877848
commit
638a66c8ff
|
@ -8,7 +8,7 @@ Synopsis
|
|||
|
||||
::
|
||||
|
||||
pwd
|
||||
pwd [(-P | --physical)] [(-L | --logical)]
|
||||
|
||||
|
||||
Description
|
||||
|
@ -18,6 +18,6 @@ Description
|
|||
|
||||
The following options are available:
|
||||
|
||||
- ``-L``, Output the logical working directory, without resolving symlinks (default behavior).
|
||||
- ``-L`` or ``--logical`` Output the logical working directory, without resolving symlinks (default behavior).
|
||||
|
||||
- ``-P``, Output the physical working directory, with symlinks resolved.
|
||||
- ``-P`` or ``--physical`` Output the physical working directory, with symlinks resolved.
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
/// The pwd builtin. Respect -P to resolve symbolic links. Respect -L to not do that (the default).
|
||||
static const wchar_t *const short_options = L"LPh";
|
||||
static const struct woption long_options[] = {{L"help", no_argument, nullptr, 'h'},
|
||||
{L"logical", no_argument, nullptr, 'L'},
|
||||
{L"physical", no_argument, nullptr, 'P'},
|
||||
{nullptr, 0, nullptr, 0}};
|
||||
int builtin_pwd(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
||||
UNUSED(parser);
|
||||
|
|
Loading…
Reference in New Issue
Block a user