Function npp {
Param([String]$filepath)
start 'D:\Program Files (x86)\Notepad++\notepad++.exe' &($filepath)
}
Function nteract {
$file = $args[0]
start 'D:\Program Files\nteract\nteract.exe' &($file)
}
I wrote two beginner functions for the purpose of recreating the much easier aliases in bash and fish. I have tried two ways of capturing a file argument as shown above. Neither of them work. Instead I receive the following.
Say I am opening the file '.\01 Getting started.ipynb' in nteract.
Id Name PSJobTypeName State HasMoreData Location Command
-- ---- ------------- ----- ----------- -------- -------
7 Job7 BackgroundJob Running True localhost Microsoft.PowerShell.Man…
.\01. Getting started.ipynb
This displays in my console, and opens a default instance of nteract with an empty notebook. The same happens with Notepad++ with other files.
Insert a complaint here about how confusing it is to get this functionality working compared to Linux shells. What am I doing wrong?
-==-
EDIT: This question has been answered sufficiently, but I did notice strange behavior the first time I commented out the functions I wrote in my profile.
PS D:\julitory\JuliaBoxTutorials\introductory-tutorials\intro-to-julia> . $profile
PS D:\julitory\JuliaBoxTutorials\introductory-tutorials\intro-to-julia> nteract '.\02. Strings.ipynb'
Id Name PSJobTypeName State HasMoreData Location
-- ---- ------------- ----- ----------- --------
5 Job5 BackgroundJob Running True localhost
.\02. Strings.ipynb
For some reason, this occured the first time I commented them out. So I uncommented them, and it began to work again... then, the next time I commented them, they continued to work. I think I'm just too tired for this, but thanks all.