On Sat, Aug 19, 2017 at 8:22 AM, Mark Volkmann <r.mark.volkm...@gmail.com>
wrote:
>
> Okay, I see that works.
> But I wonder why current-line-number behaves differently than
> current-function and current-filename.
> I can use parens around those to output them with an echo.
>
Parentheses create a subcommand context -- not a new file or function
context. So when you do `(status current-function)` fish looks walks up the
execution context stack till it finds a function frame and uses that to
extract the function name. Same for `(status current-file)`. What should
`(status current-line)` do? What stack frame should it use? That question
is basically the crux of
https://github.com/fish-shell/fish-shell/issues/4161. Feel free to comment
on that issue.
--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users