octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

userpath function implemented - need testers


From: TrucomanX XnamocurT
Subject: userpath function implemented - need testers
Date: Fri, 28 Aug 2015 01:02:44 -0300


Hi
In my last post I talk about the function userpath()
Now I change the link, the current link is:

https://github.com/trucomanx/userpathlib

for to install:

pkg prefix ~/lib/octave
pkg install userpathlib.tar.gz


------------------------------------------------------------------------
I have implemented,

the function userpath() of matlab:

  myuserpath=userpath('reset')
  userpath('/home/username/mystartupdir')
  userpath('reset')
  userpath('clear')

And others interesting (I think so) multiplatform functions as:

% Home user directory, like OCTAVE_HOME()
USER_HOME()
ans=\home\user
and=C:/Users/user

%If exist some_directory directory in the path()
existpath(some_directory)
ans=1
ans=0

% similar a userpath but return a directory not a path
  USERDIR=USER_DIR()
  USERDIR=USER_DIR('default')
  USERDIR=USER_DIR('loaddefault')
  USERDIR=USER_DIR('loadlast')
  USERDIR=USER_DIR('/home/username/mystartupdir')
  USERDIR=USER_DIR('clear')

And I propose a modification  at the end the .octaverc file for it to work userpath and USER_DIR
% .octaverc
if (exist(USER_DIR('loadlast'),'dir')==7)

    disp(['Loaded last startup user directory: ',USER_DIR()]);

end

the files can be download from:

https://github.com/trucomanx/userpathlib

I also like information over how submit this modifications.

thanks

Fernando

reply via email to

[Prev in Thread] Current Thread [Next in Thread]