Skip to content

Added a command for fish shell - #13

Merged
Araxeus merged 2 commits into
Araxeus:add-scriptsfrom
marcoil:fish-shell
May 27, 2022
Merged

Araxeus merged 2 commits into
Araxeus:add-scriptsfrom
marcoil:fish-shell

Conversation

@marcoil

@marcoil marcoil commented May 26, 2022

Copy link
Copy Markdown

This script makes lsi work on my setup (Ubuntu 20.04 + fish), although to select a directory the key is Alt+Enter.

@Araxeus

Araxeus commented May 26, 2022

Copy link
Copy Markdown
Owner

what is the status variable?
if test $status -eq 0

isn't if [ -n "$output" ] enough?

also, I think $argv should be surrounded with quotes to avoid weird bugs

@marcoil

marcoil commented May 26, 2022

Copy link
Copy Markdown
Author

what is the status variable?

The result of the last command, the bash script checks it so I added it. I can take it out, but I still think it's better to use fish's test command.

I think $argv should be surrounded with quotes to avoid weird bugs

Do you want all arguments passed to lsi to be considered just one argument to ls-argument? In that case yes, it should have double quotes.

@Araxeus

Araxeus commented May 26, 2022

Copy link
Copy Markdown
Owner

The result of the last command, the bash script checks it so I added it. I can take it out, but I still think it's better to use fish's test command.

Ok if you think its necessary

Do you want all arguments passed to lsi to be considered just one argument to ls-argument? In that case yes, it should have double quotes.

well lsi can optionally receive one arg and its the starting path

from what I understand from you, if $argv is double quoted and I execute the command lsi big folder
it will pass to lsi the string big folder?
if that is the case then its totally fine, seems to add support for spaces in folder names 😝

@marcoil

marcoil commented May 26, 2022

Copy link
Copy Markdown
Author

if $argv is double quoted and I execute the command lsi big folder
it will pass to lsi the string big folder?

Exactly. If ls-interactive only wants one parameter, then it makes sense to quote argv. I'll patch it.

@Araxeus
Araxeus changed the base branch from master to add-scripts May 27, 2022 12:37
@Araxeus
Araxeus merged commit cc5ff97 into Araxeus:add-scripts May 27, 2022
@Araxeus

Araxeus commented May 27, 2022

Copy link
Copy Markdown
Owner

Thank you :)

@Araxeus Araxeus mentioned this pull request May 27, 2022
3 of 6 tasks
@marcoil
marcoil deleted the fish-shell branch May 27, 2022 16:03
Araxeus added a commit that referenced this pull request Dec 31, 2022
* Remove `dialoguer` dependency and by switching to internal prompt renderer

* Allow using Left/Right arrow to navigate folders when the fuzzy text field is empty

* Add shell support (expands on #13)
  - [x] pwsh/powershell
  - [x] fish
  - [x] Nu (Nushell)
  - [ ] Zsh (Z-Shell) - should be able to just put the function from `lsi.sh` inside `.zshrc`?
  - [ ] Ksh (Korn Shell) ?
  - [ ] Tcsh (Tenex C Shell) ?

* Refactor/lint + small bug fixes

* Update README
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.

2 participants