Skip to content

Commit

Permalink
Respect $env:FZF_ALT_C_COMMAND
Browse files Browse the repository at this point in the history
  • Loading branch information
kelleyma49 committed Jun 6, 2018
1 parent 7144b97 commit 3cdf116
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PSFzf.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,11 @@ function Invoke-FzfPsReadlineHandlerSetLocation {
$result = $null
try
{
Get-ChildItem . -Recurse -ErrorAction SilentlyContinue -Directory | Invoke-Fzf | ForEach-Object { $result = $_ }
if ($env:FZF_ALT_C_COMMAND -eq $null) {
Get-ChildItem . -Recurse -ErrorAction SilentlyContinue -Directory | Invoke-Fzf | ForEach-Object { $result = $_ }
} else {
Invoke-Expression ($env:FZF_ALT_C_COMMAND + ' ' + $env:FZF_ALT_C_OPTS) | Invoke-Fzf | ForEach-Object { $result = $_ }
}
}
catch
{
Expand Down

0 comments on commit 3cdf116

Please sign in to comment.