bugzilla-daemon at mindrot.org
2023-Oct-06 01:33 UTC
[Bug 3622] New: Please add an option to generate fish shell output
https://bugzilla.mindrot.org/show_bug.cgi?id=3622
Bug ID: 3622
Summary: Please add an option to generate fish shell output
Product: Portable OpenSSH
Version: 9.5p1
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: ssh-agent
Assignee: unassigned-bugs at mindrot.org
Reporter: kemelzaidan at gmail.com
Please, add an argument (maybe -f since it's not in use) to generate
fish shell commands to the stdout just like there are options for C
shell and Bash.
Fish shell sets variable with the set command. -x for export and -g for
global scope, so you would need:
```sh
set -xg SSH_AUTH_SOCK /tmp/ssh-XXXXXXKjJOVJ/agent.199681
set-xg SSH_AGENT_PID 199682
echo Agent pid 199682
```
To unset the variables, use the -e flag like:
set -e SSH_AUTH_SOCK
You can take a look in the fish shell documentation here:
https://fishshell.com/docs/current/cmds/set.html
Thanks,
Kemel Zaidan
--
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2023-Oct-06 02:57 UTC
[Bug 3622] Please add an option to generate fish shell output
https://bugzilla.mindrot.org/show_bug.cgi?id=3622
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |djm at mindrot.org
--- Comment #1 from Damien Miller <djm at mindrot.org> ---
FYI fish appears to be almost as popular as tcsh
https://qa.debian.org/popcon.php?package=fish
https://qa.debian.org/popcon.php?package=tcsh
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2023-Oct-06 04:37 UTC
[Bug 3622] Please add an option to generate fish shell output
https://bugzilla.mindrot.org/show_bug.cgi?id=3622 --- Comment #2 from Kemel Zaidan <kemelzaidan at gmail.com> --- just amending my report. You should use set -xU instead of -xg. -U stands for universal, so every terminal has access to this variable. So, I must understand that's an accepted feature request since there's support for tcsh and that is as popular (or less) than fish... ;-) -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2023-Oct-06 05:08 UTC
[Bug 3622] Please add an option to generate fish shell output
https://bugzilla.mindrot.org/show_bug.cgi?id=3622 --- Comment #3 from Damien Miller <djm at mindrot.org> --- AFAIK it's the reverse: tcsh is more popular than fish. Also there's csh: https://qa.debian.org/popcon.php?package=tcsh which is another C-shell. Re -U, the fish documentation says this:> -U or --universal > Sets a universal variable. The variable will be immediately available to all > the user?s fish instances on the machine, and will be persist across restarts > of the shell.This would be a significant difference between how ssh-agent under fish would work vs how it works with other shells. It seems superficially convenient, but IMO it would be a bad idea as it would break things like ssh forwarded agents. (None of this is should be interpreted as an agreement to implement fish support in ssh-agent, I'm just trying to bring some data to the decision) -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2023-Oct-06 07:48 UTC
[Bug 3622] Please add an option to generate fish shell output
https://bugzilla.mindrot.org/show_bug.cgi?id=3622
Dmitry Belyavskiy <dbelyavs at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dbelyavs at redhat.com
--- Comment #4 from Dmitry Belyavskiy <dbelyavs at redhat.com> ---
I'd say that if syntax for various shells is to be supported, it's
worth having smth like
-f shellname
for better maintenance
--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2023-Oct-06 08:27 UTC
[Bug 3622] Please add an option to generate fish shell output
https://bugzilla.mindrot.org/show_bug.cgi?id=3622 --- Comment #5 from Kemel Zaidan <kemelzaidan at gmail.com> --- Sorry @Damien. I'm still learning about fish. It's looks you are write and that I missed this details of persistence between restarts. I believe my first interaction was right and global scope would be enough for the intent, without any contraindication. Thanks for the attention given. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.