Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSEUDOHOSTS: Optional argument to PSEUDOHOST creates a specialized cd command #1999

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rmkaplan
Copy link
Contributor

For example, (PSEUDOHOST 'NOTECARDS "[notecards path]" 'n) creates the command cdn, and
cdn connects to {NOTECARDS}
cdn system connects to {NOTECARDS}/system/

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Feb 2, 2025

I looked more carefully at what happens when PSEUDOHOST can't resolve a prefix to a real host, either error or return NIL if new argument NOERROR is set.

@masinter
Copy link
Member

masinter commented Feb 2, 2025

I'm a little worried about the proliferation of short commands 'cdn' that are not of widespread utility.
I know each is relatively harmless, but .... who would use this feature?

Part of my concern is the ambiguity of typing a variable name to EVAL it vs a short command with the same name. It's only ambiguous when there's a command that makes sense when the command name by itself with no other items on the line.

Also I think we want to move the extra repos (test, loops, notecards) to be subtree or submodule of medley.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Feb 2, 2025 via email

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Feb 2, 2025 via email

@nbriggs
Copy link
Contributor

nbriggs commented Feb 2, 2025

Isn't this the sort of thing that you could have outside of the PSEUDOHOSTS code? "cd {NOTECARDS}" will do as expected so adding command aliases in your init file for each of the cd<foo> that you want should be trivial without having it in the PSEUDOHOST arglist, shouldn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants