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

Disable Startup Command #153

Open
Catgroove opened this issue Aug 28, 2024 · 6 comments · May be fixed by #174
Open

Disable Startup Command #153

Catgroove opened this issue Aug 28, 2024 · 6 comments · May be fixed by #174
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Catgroove
Copy link

Catgroove commented Aug 28, 2024

What would you like sesh to do?

Apologies if this is already possible.

When using a default session along with a startup command, I would like to be able to clear that on a session basis using something along the lines of startup_command = "".

Why?

For my default startup command, I typically want to always run nvim, but for some specific sessions, I would just like to be placed in the directory, for example when I'm opening up my folder of git repositories.

@Catgroove Catgroove added the enhancement New feature or request label Aug 28, 2024
@joshmedeski
Copy link
Owner

I recommend setting it to something like ls. That's what I do in this situation.

@Catgroove
Copy link
Author

That works. Feels a bit hacky but good enough for now.

@joshmedeski
Copy link
Owner

Do you have any suggestions?

We could detect if the startup command is an empty value then don't run the default command. Not sure if that's very intuitive

@joshmedeski
Copy link
Owner

What do you think of this

[[session]]
name = "fish config"
path = "~/c/dotfiles/.config/fish"
disable_startup_command = true

It should be trivial to implement, but I think adding some sort of simple command is easy enough.

@Catgroove
Copy link
Author

What do you think of this

[[session]]
name = "fish config"
path = "~/c/dotfiles/.config/fish"
disable_startup_command = true

It should be trivial to implement, but I think adding some sort of simple command is easy enough.

Looks good! More intuitive than leaving it empty, for sure, even though that's what I tried initially.

@joshmedeski joshmedeski changed the title Clear default sessions startup command on a session basis Disable Startup Command Sep 19, 2024
@joshmedeski joshmedeski added the good first issue Good for newcomers label Sep 19, 2024
@joshmedeski
Copy link
Owner

joshmedeski commented Sep 19, 2024

Great, I'll add this as an official feature to be worked on soon.


As a user, I want to disable the default startup command, to avoid unwanted behavior for certain sessions and improve my workflow.

  • Add a disable_startup_command option to the session configuration
  • Skip the default startup command if the option is set to true on the selected config session
[[session]]
name = "fish config"
path = "~/c/dotfiles/.config/fish"
disable_startup_command = true

@Catgroove Catgroove linked a pull request Sep 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Next
Development

Successfully merging a pull request may close this issue.

2 participants