Enchance npz_preview
This commit is contained in:
17
.bashrc.kuba
17
.bashrc.kuba
@@ -55,8 +55,10 @@ class Wrap:
|
||||
setattr(self, f, n[f])
|
||||
globs[f] = n[f]
|
||||
|
||||
archive = Wrap(argv[1])
|
||||
print('Global namespace populated with "archive" and all files')
|
||||
argv = argv[argv.index('--')+1:]
|
||||
archives = [Wrap(arg) for arg in argv[::-1]]
|
||||
archive = archives[0]
|
||||
print('Global namespace populated with "archive", "archives" and all files')
|
||||
EOM
|
||||
)"
|
||||
|
||||
@@ -66,7 +68,16 @@ npz_preview() {
|
||||
return
|
||||
fi
|
||||
|
||||
python -ic "$npz_py_str" "$1"
|
||||
python -ic "$npz_py_str" -- "$@"
|
||||
}
|
||||
|
||||
npz_previewi() {
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Please specify file to open as argument"
|
||||
return
|
||||
fi
|
||||
|
||||
ipython -i -c "$npz_py_str" -- "$@"
|
||||
}
|
||||
|
||||
rsync_wrap() {
|
||||
|
||||
Reference in New Issue
Block a user